diff options
author | iphydf <iphydf@users.noreply.github.com> | 2018-08-26 20:39:01 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-08-30 21:57:35 +0000 |
commit | 730e4cfe82c8be5fb37cfe8b47ef0abd9a2496dc (patch) | |
tree | 93af2142b99a1acfa1ebef13327044c00b08df5c /toxcore | |
parent | a5cd4764aa3e5f8f0ba18d8348f5995d255f6c00 (diff) |
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.
Diffstat (limited to 'toxcore')
-rw-r--r-- | toxcore/mono_time.c | 4 |
1 files changed, 1 insertions, 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) | |||
120 | last_clock_mono = time; | 120 | last_clock_mono = time; |
121 | #else | 121 | #else |
122 | struct timespec clock_mono; | 122 | struct timespec clock_mono; |
123 | #if defined(__linux__) && defined(CLOCK_MONOTONIC_RAW) | 123 | #if defined(__APPLE__) |
124 | clock_gettime(CLOCK_MONOTONIC_RAW, &clock_mono); | ||
125 | #elif defined(__APPLE__) | ||
126 | clock_serv_t muhclock; | 124 | clock_serv_t muhclock; |
127 | mach_timespec_t machtime; | 125 | mach_timespec_t machtime; |
128 | 126 | ||