Skip to content
Snippets Groups Projects
Commit 97434544 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Actually, CLOCK_SECOND is better than CLOCK_MONOTONIC_FAST

It's basically CLOCK_REALTIME with tv_nsec set to zero.
parent 3ae264bc
No related branches found
No related tags found
No related merge requests found
Pipeline #7689 failed
......@@ -1128,12 +1128,6 @@ int64_t xp_fast_timer64(void)
struct timespec ts;
static clockid_t cid = CLOCK_REALTIME;
#ifdef CLOCK_SECOND
if (cid == CLOCK_REALTIME) {
if (clock_getres(CLOCK_SECOND, &ts) == 0)
cid = CLOCK_SECOND;
}
#endif
#ifdef CLOCK_MONOTONIC_COARSE
if (cid == CLOCK_REALTIME) {
if (clock_getres(CLOCK_MONOTONIC_COARSE, &ts) == 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment