| 28 | #include <process.h> |
| 29 | |
| 30 | VTK_ABI_NAMESPACE_BEGIN |
| 31 | static int gettimeofday(struct timeval* tv, void*) |
| 32 | { |
| 33 | FILETIME ft; |
| 34 | GetSystemTimeAsFileTime(&ft); |
| 35 | |
| 36 | vtkTypeInt64 tmpres = 0; |
| 37 | tmpres = ft.dwHighDateTime; |
| 38 | tmpres <<= 32; |
| 39 | tmpres |= ft.dwLowDateTime; |
| 40 | |
| 41 | /*converting file time to unix epoch*/ |
| 42 | const vtkTypeInt64 DELTA_EPOCH_IN_MICROSECS = 11644473600000000; |
| 43 | tmpres /= 10; /*convert into microseconds*/ |
| 44 | tmpres -= DELTA_EPOCH_IN_MICROSECS; |
| 45 | tv->tv_sec = (vtkTypeInt64)(tmpres * 0.000001); |
| 46 | tv->tv_usec = (tmpres % 1000000); |
| 47 | |
| 48 | return 0; |
| 49 | } |
| 50 | VTK_ABI_NAMESPACE_END |
| 51 | #endif |
| 52 |
no outgoing calls
no test coverage detected