| 19 | #include <time.h> |
| 20 | #ifndef _WIN32 |
| 21 | static inline uint64_t GetTime() { |
| 22 | // We want the time in the least amount of overhead possible |
| 23 | // clock_gettime will do a VDSO call with the least amount of overhead |
| 24 | struct timespec ts; |
| 25 | clock_gettime(CLOCK_MONOTONIC, &ts); |
| 26 | return ts.tv_sec * 1'000'000'000ULL + ts.tv_nsec; |
| 27 | } |
| 28 | #else |
| 29 | |
| 30 | static inline uint64_t GetTime() { |
no test coverage detected