eDosStation/EpdBase3/TimeFunctions.h

25 lines
638 B
C
Raw Normal View History

2021-05-28 17:06:41 +02:00
#pragma once
#include <windows.h>
#include <time.h>
class TimeFunctions
{
public:
2021-05-31 15:20:16 +02:00
2021-05-28 17:06:41 +02:00
TimeFunctions();
static void EpdTimeToFileTime(INT32 t, LPFILETIME pft, bool isMK2);
void FileTimeToEpdTime(FILETIME pft, INT32* t, bool isMK2);
static UINT32 NowToEpdTime(bool isMK2);
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);
2021-05-28 17:06:41 +02:00
};
2021-05-31 15:20:16 +02:00
static union {
FILETIME FT; unsigned long long LL;
} lu;
static SYSTEMTIME ST;
2021-05-28 17:06:41 +02:00
UINT32 FileTime_to_POSIX(FILETIME ft);
UINT32 UnixTimeNow();