From 730e4cfe82c8be5fb37cfe8b47ef0abd9a2496dc Mon Sep 17 00:00:00 2001 From: iphydf Date: Sun, 26 Aug 2018 20:39:01 +0000 Subject: [PATCH] Remove the use of `CLOCK_MONOTONIC_RAW`. The raw clock isn't subject to NTP adjustments. It may run less accurately than the regular monotonic clock. I see no reason why raw would be better for tox than the normal one. This avoids one piece of OS-specific ifdef'd code. --- toxcore/mono_time.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/toxcore/mono_time.c b/toxcore/mono_time.c index 7fdf2d7e..aa272749 100644 --- a/toxcore/mono_time.c +++ b/toxcore/mono_time.c @@ -120,9 +120,7 @@ static uint64_t current_time_monotonic_default(void *user_data) last_clock_mono = time; #else struct timespec clock_mono; -#if defined(__linux__) && defined(CLOCK_MONOTONIC_RAW) - clock_gettime(CLOCK_MONOTONIC_RAW, &clock_mono); -#elif defined(__APPLE__) +#if defined(__APPLE__) clock_serv_t muhclock; mach_timespec_t machtime;