From 8892561917ad84fd25901a641a2b3d444e9ee95a Mon Sep 17 00:00:00 2001 From: Mike Brady Date: Mon, 29 Jun 2015 09:08:58 +0000 Subject: [PATCH] Use CLOCK_MONOTONIC_RAW for better timing estimation --- common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.c b/common.c index d3bdeacb..d4c534f3 100644 --- a/common.c +++ b/common.c @@ -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