mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
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.
This commit is contained in:
parent
a5cd4764aa
commit
730e4cfe82
|
@ -120,9 +120,7 @@ static uint64_t current_time_monotonic_default(void *user_data)
|
||||||
last_clock_mono = time;
|
last_clock_mono = time;
|
||||||
#else
|
#else
|
||||||
struct timespec clock_mono;
|
struct timespec clock_mono;
|
||||||
#if defined(__linux__) && defined(CLOCK_MONOTONIC_RAW)
|
#if defined(__APPLE__)
|
||||||
clock_gettime(CLOCK_MONOTONIC_RAW, &clock_mono);
|
|
||||||
#elif defined(__APPLE__)
|
|
||||||
clock_serv_t muhclock;
|
clock_serv_t muhclock;
|
||||||
mach_timespec_t machtime;
|
mach_timespec_t machtime;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user