2025-01-09 12:47:42 +01:00
|
|
|
#pragma once
|
|
|
|
|
#include <windows.h>
|
|
|
|
|
#include <time.h>
|
|
|
|
|
class TimeFunctions
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TimeFunctions();
|
|
|
|
|
static void Epd2TimeToFileTime(INT32 t, LPFILETIME pft);
|
|
|
|
|
void FileTimeToEpd2Time(FILETIME pft, INT32* t);
|
|
|
|
|
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();
|