2 #define __seconds_h__ 1
11 #if defined(_MSC_VER) || defined(_MSC_EXTENSIONS)
12 #define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64
14 #define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
25 inline int gettimeofday(
struct timeval *tv,
struct timezone *tz)
31 unsigned __int64 tmpres = 0;
32 static int tzflag = 0;
36 GetSystemTimeAsFileTime(&ft);
41 tmpres |= ft.dwHighDateTime;
43 tmpres |= ft.dwLowDateTime;
50 tmpres -= DELTA_EPOCH_IN_MICROSECS;
54 tv->tv_sec = (long)(tmpres / 1000000UL);
55 tv->tv_usec = (long)(tmpres % 1000000UL);
67 tz->tz_minuteswest = _timezone / 60;
68 tz->tz_dsttime = _daylight;
85 gettimeofday(&tv,NULL);
86 return tv.tv_sec+tv.tv_usec/1000000.0;