Skip to content

Commit dddfcf4

Browse files
authored
Fix #7649 - Switch Linux performance counter timer to CLOCK_MONOTONIC_RAW. (#7650)
1 parent 54ca5e4 commit dddfcf4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/common/utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@ SINT64 query_performance_counter()
10331033

10341034
// Use high-resolution clock
10351035
struct timespec tp;
1036-
if (clock_gettime(CLOCK_REALTIME, &tp) != 0)
1036+
if (clock_gettime(CLOCK_MONOTONIC_RAW, &tp) != 0)
10371037
return 0;
10381038

10391039
return static_cast<SINT64>(tp.tv_sec) * BILLION + tp.tv_nsec;

0 commit comments

Comments
 (0)