Use CLOCK_MONOTONIC_RAW for better timing estimation

This commit is contained in:
Mike Brady
2015-06-29 09:08:58 +00:00
parent 2f379aba61
commit 8892561917
+1 -1
View File
@@ -474,7 +474,7 @@ uint64_t get_absolute_time_in_fp() {
uint64_t time_now_fp;
#ifdef COMPILE_FOR_LINUX
struct timespec tn;
clock_gettime(CLOCK_MONOTONIC, &tn);
clock_gettime(CLOCK_MONOTONIC_RAW, &tn);
time_now_fp = ((uint64_t)tn.tv_sec << 32) + ((uint64_t)tn.tv_nsec << 32) / 1000000000;
#endif
#ifdef COMPILE_FOR_OSX