From cc4d9ece420d18cf86bec44a3773f911ddfca93f Mon Sep 17 00:00:00 2001 From: Mike Brady Date: Thu, 2 Jul 2015 15:17:36 +0100 Subject: [PATCH] Revert back to CLOCK_MONOTONIC from CLOCK_MONOTONIC_RAW because OpenWrt doesn't recognise it --- common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common.c b/common.c index d4c534f3..83837437 100644 --- a/common.c +++ b/common.c @@ -474,7 +474,8 @@ uint64_t get_absolute_time_in_fp() { uint64_t time_now_fp; #ifdef COMPILE_FOR_LINUX struct timespec tn; - clock_gettime(CLOCK_MONOTONIC_RAW, &tn); + // can't use CLOCK_MONOTONIC_RAW as it's not implemented in OpenWrt + clock_gettime(CLOCK_MONOTONIC, &tn); time_now_fp = ((uint64_t)tn.tv_sec << 32) + ((uint64_t)tn.tv_nsec << 32) / 1000000000; #endif #ifdef COMPILE_FOR_OSX