diff options
Diffstat (limited to '')
-rw-r--r-- | CPP/Windows/TimeUtils.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/CPP/Windows/TimeUtils.h b/CPP/Windows/TimeUtils.h new file mode 100644 index 0000000..d1d8c15 --- /dev/null +++ b/CPP/Windows/TimeUtils.h | |||
@@ -0,0 +1,32 @@ | |||
1 | // Windows/TimeUtils.h | ||
2 | |||
3 | #ifndef __WINDOWS_TIME_UTILS_H | ||
4 | #define __WINDOWS_TIME_UTILS_H | ||
5 | |||
6 | #include "../Common/MyTypes.h" | ||
7 | #include "../Common/MyWindows.h" | ||
8 | |||
9 | namespace NWindows { | ||
10 | namespace NTime { | ||
11 | |||
12 | bool DosTimeToFileTime(UInt32 dosTime, FILETIME &fileTime) throw(); | ||
13 | bool FileTimeToDosTime(const FILETIME &fileTime, UInt32 &dosTime) throw(); | ||
14 | |||
15 | // UInt32 Unix Time : for dates 1970-2106 | ||
16 | UInt64 UnixTimeToFileTime64(UInt32 unixTime) throw(); | ||
17 | void UnixTimeToFileTime(UInt32 unixTime, FILETIME &fileTime) throw(); | ||
18 | |||
19 | // Int64 Unix Time : negative values for dates before 1970 | ||
20 | UInt64 UnixTime64ToFileTime64(Int64 unixTime) throw(); | ||
21 | bool UnixTime64ToFileTime(Int64 unixTime, FILETIME &fileTime) throw(); | ||
22 | |||
23 | bool FileTimeToUnixTime(const FILETIME &fileTime, UInt32 &unixTime) throw(); | ||
24 | Int64 FileTimeToUnixTime64(const FILETIME &ft) throw(); | ||
25 | |||
26 | bool GetSecondsSince1601(unsigned year, unsigned month, unsigned day, | ||
27 | unsigned hour, unsigned min, unsigned sec, UInt64 &resSeconds) throw(); | ||
28 | void GetCurUtcFileTime(FILETIME &ft) throw(); | ||
29 | |||
30 | }} | ||
31 | |||
32 | #endif | ||