From fe00d4135a66b1a8a9dd7b2c03a74727b3f644b2 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Sun, 17 Nov 2024 14:27:47 -0800 Subject: Use monotonic clock for timing. --- Spear/Sys/Timer/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Spear/Sys/Timer/timer.c b/Spear/Sys/Timer/timer.c index 8487f48..707cd63 100644 --- a/Spear/Sys/Timer/timer.c +++ b/Spear/Sys/Timer/timer.c @@ -48,7 +48,7 @@ void time_now(time_point* t) { #ifdef _WIN32 QueryPerformanceCounter((LARGE_INTEGER*)t); #else - clock_gettime(CLOCK_REALTIME, t); + clock_gettime(CLOCK_MONOTONIC_RAW, t); #endif } -- cgit v1.2.3