diff options
author | 3gg <3gg@shellblade.net> | 2024-11-17 14:27:47 -0800 |
---|---|---|
committer | 3gg <3gg@shellblade.net> | 2024-11-17 14:27:47 -0800 |
commit | fe00d4135a66b1a8a9dd7b2c03a74727b3f644b2 (patch) | |
tree | 42e7033eccdfe63de4d08770ebead214bceb9669 | |
parent | 4bbd2d43b5c92197ea23bc3db42a9d2991390eb1 (diff) |
Use monotonic clock for timing.
-rw-r--r-- | Spear/Sys/Timer/timer.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) { | |||
48 | #ifdef _WIN32 | 48 | #ifdef _WIN32 |
49 | QueryPerformanceCounter((LARGE_INTEGER*)t); | 49 | QueryPerformanceCounter((LARGE_INTEGER*)t); |
50 | #else | 50 | #else |
51 | clock_gettime(CLOCK_REALTIME, t); | 51 | clock_gettime(CLOCK_MONOTONIC_RAW, t); |
52 | #endif | 52 | #endif |
53 | } | 53 | } |
54 | 54 | ||