| 139 | #ifdef WIN32 |
| 140 | #define CLOCK_REALTIME 0 |
| 141 | static int clock_gettime(int x, struct timespec *spec) //C-file part |
| 142 | { |
| 143 | __int64 wintime; GetSystemTimeAsFileTime((FILETIME*)&wintime); |
| 144 | wintime -= 116444736000000000i64; //1jan1601 to 1jan1970 |
| 145 | spec->tv_sec = wintime / 10000000i64; //seconds |
| 146 | spec->tv_nsec = wintime % 10000000i64 * 100; //nano-seconds |
| 147 | return 0; |
| 148 | } |
| 149 | #endif |
| 150 | |
| 151 | #if 0 |