unrarsrc  6.1.7
About: unrar extracts, views and tests the contents of archives created with the RAR archiver.
  Fossies Dox: unrarsrc-6.1.7.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

Go to the documentation of this file.
1#ifndef _RAR_TIMEFN_
2#define _RAR_TIMEFN_
12 uint Reminder; // Part of time smaller than 1 second, represented in 1/REMINDER_PRECISION intervals.
20 private:
21 static const uint TICKS_PER_SECOND = 1000000000; // Internal precision.
23 // Internal time representation in 1/TICKS_PER_SECOND since 01.01.1601.
24 // We use nanoseconds here to handle the high precision Unix time.
26 public:
27 // RarLocalTime::Reminder precision. Must be equal to TICKS_PER_SECOND.
28 // Unlike TICKS_PER_SECOND, it is a public field.
30 public:
32 bool operator == (RarTime &rt) {return itime==rt.itime;}
33 bool operator != (RarTime &rt) {return itime!=rt.itime;}
34 bool operator < (RarTime &rt) {return itime<rt.itime;}
35 bool operator <= (RarTime &rt) {return itime<rt.itime || itime==rt.itime;}
36 bool operator > (RarTime &rt) {return itime>rt.itime;}
37 bool operator >= (RarTime &rt) {return itime>rt.itime || itime==rt.itime;}
39 void GetLocal(RarLocalTime *lt);
40 void SetLocal(RarLocalTime *lt);
41#ifdef _WIN_ALL
42 void GetWinFT(FILETIME *ft);
43 void SetWinFT(FILETIME *ft);
45 uint64 GetWin();
46 void SetWin(uint64 WinTime);
47 time_t GetUnix();
48 void SetUnix(time_t ut);
50 void SetUnixNS(uint64 ns);
51 uint GetDos();
52 void SetDos(uint DosTime);
53 void GetText(wchar *DateStr,size_t MaxSize,bool FullMS);
54 void SetIsoText(const wchar *TimeText);
55 void SetAgeText(const wchar *TimeText);
56 void SetCurrentTime();
57 void Reset() {itime=0;}
58 bool IsSet() {return itime!=0;}
59 void Adjust(int64 ns);
62const wchar *GetMonthName(int Month);
63bool IsLeapYear(int Year);
bool operator!=(RarTime &rt)
Definition: timefn.hpp:33
void SetDos(uint DosTime)
Definition: timefn.cpp:211
uint GetDos()
Definition: timefn.cpp:201
void GetLocal(RarLocalTime *lt)
Definition: timefn.cpp:3
bool operator<=(RarTime &rt)
Definition: timefn.hpp:35
void SetWin(uint64 WinTime)
Definition: timefn.cpp:158
void SetUnix(time_t ut)
Definition: timefn.cpp:170
time_t GetUnix()
Definition: timefn.cpp:164
static const uint TICKS_PER_SECOND
Definition: timefn.hpp:21
bool operator==(RarTime &rt)
Definition: timefn.hpp:32
Definition: timefn.hpp:31
void SetAgeText(const wchar *TimeText)
Definition: timefn.cpp:271
void Adjust(int64 ns)
Definition: timefn.cpp:322
bool operator<(RarTime &rt)
Definition: timefn.hpp:34
void SetUnixNS(uint64 ns)
Definition: timefn.cpp:193
static const uint REMINDER_PRECISION
Definition: timefn.hpp:29
uint64 GetWin()
Definition: timefn.cpp:151
void GetText(wchar *DateStr, size_t MaxSize, bool FullMS)
Definition: timefn.cpp:225
void SetCurrentTime()
Definition: timefn.cpp:305
bool operator>(RarTime &rt)
Definition: timefn.hpp:36
void SetIsoText(const wchar *TimeText)
Definition: timefn.cpp:245
bool IsSet()
Definition: timefn.hpp:58
uint64 itime
Definition: timefn.hpp:25
uint64 GetUnixNS()
Definition: timefn.cpp:184
void SetLocal(RarLocalTime *lt)
Definition: timefn.cpp:70
void Reset()
Definition: timefn.hpp:57
bool operator>=(RarTime &rt)
Definition: timefn.hpp:37
wchar_t wchar
Definition: rartypes.hpp:13
int64_t int64
Definition: rartypes.hpp:12
unsigned int uint
Definition: rartypes.hpp:8
uint64_t uint64
Definition: rartypes.hpp:11
uint Year
Definition: timefn.hpp:6
uint Minute
Definition: timefn.hpp:10
uint Reminder
Definition: timefn.hpp:12
uint yDay
Definition: timefn.hpp:14
uint wDay
Definition: timefn.hpp:13
uint Second
Definition: timefn.hpp:11
uint Hour
Definition: timefn.hpp:9
uint Day
Definition: timefn.hpp:8
uint Month
Definition: timefn.hpp:7
const wchar * GetMonthName(int Month)
Definition: timefn.cpp:330
bool IsLeapYear(int Year)
Definition: timefn.cpp:337