45 static const unsigned __int64 epoch = 116444736000000000Ui64;
53 int gettimeofday(
struct timeval *tp,
struct timezone *tzp)
56 SYSTEMTIME system_time;
57 ULARGE_INTEGER ularge;
59 GetSystemTime(&system_time);
60 SystemTimeToFileTime(&system_time, &file_time);
61 ularge.LowPart = file_time.dwLowDateTime;
62 ularge.HighPart = file_time.dwHighDateTime;
64 tp->tv_sec = (long)((ularge.QuadPart - epoch) / 10000000L);
65 tp->tv_usec = (long)(system_time.wMilliseconds * 1000);