eDosStation/EpdBase/TimeFunctions.h
2021-05-31 15:20:16 +02:00

26 lines
699 B
C++

#pragma once
#include <windows.h>
#include <time.h>
class TimeFunctions
{
public:
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);
static void EPD2PeakTimeToFiletime(DWORD EpdClock, DWORD EpdPeakTime, FILETIME* PeakFileTime);
};
static union {
FILETIME FT; unsigned long long LL;
} lu;
static SYSTEMTIME ST;
UINT32 FileTime_to_POSIX(FILETIME ft);
UINT32 UnixTimeNow();
UINT32 FileTime_to_POSIX(FILETIME ft);
UINT32 UnixTimeNow();