42 #if defined(_MSC_VER) || defined(_MSC_EXTENSIONS) 43 #define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64 45 #define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL 54 int gettimeofday(
struct timeval *tv,
struct timezone *tz)
60 unsigned __int64 tmpres = 0;
61 static int tzflag = 0;
65 GetSystemTimeAsFileTime(&ft);
70 tmpres |= ft.dwHighDateTime;
72 tmpres |= ft.dwLowDateTime;
79 tmpres -= DELTA_EPOCH_IN_MICROSECS;
83 tv->tv_sec = (long)(tmpres / 1000000UL);
84 tv->tv_usec = (long)(tmpres % 1000000UL);
96 _get_daylight(&hours);
99 tz->tz_minuteswest = sec / 60;
100 tz->tz_dsttime = hours;
115 #if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0) && defined(_POSIX_MONOTONIC_CLOCK)) 117 clock_gettime(CLOCK_MONOTONIC, &ts);
118 return ts.tv_sec + ts.tv_nsec*1e-9;
ScopeTime(const char *title)
utility functions for handling time related stuff
double get_monotonic_time()