eDosStation/EpdBase/TimeFunctions.h

27 lines
699 B
C
Raw Normal View History

2019-02-01 09:54:48 +01:00
#pragma once
#include <windows.h>
#include <time.h>
2021-04-16 10:38:48 +02:00
class TimeFunctions
2019-02-01 09:54:48 +01:00
{
public:
2021-05-31 15:20:16 +02:00
2019-02-01 09:54:48 +01:00
TimeFunctions();
2021-05-28 17:06:41 +02:00
static void EpdTimeToFileTime(INT32 t, LPFILETIME pft, bool isMK2);
void FileTimeToEpdTime(FILETIME pft, INT32* t, bool isMK2);
static UINT32 NowToEpdTime(bool isMK2);
2019-02-01 09:54:48 +01:00
static void UnixTimeToFileTime(time_t t, LPFILETIME pft);
static void UnixTimeToSystemTime(time_t t, LPSYSTEMTIME pst);
2021-05-31 15:20:16 +02:00
static void EPD2PeakTimeToFiletime(DWORD EpdClock, DWORD EpdPeakTime, FILETIME* PeakFileTime);
2019-02-01 09:54:48 +01:00
};
2021-05-31 15:20:16 +02:00
static union {
FILETIME FT; unsigned long long LL;
} lu;
static SYSTEMTIME ST;
UINT32 FileTime_to_POSIX(FILETIME ft);
UINT32 UnixTimeNow();
2021-05-21 16:22:20 +02:00
UINT32 FileTime_to_POSIX(FILETIME ft);
UINT32 UnixTimeNow();