Skip to content

Commit

Permalink
Fix #7649 - Switch Linux performance counter timer to CLOCK_MONOTONIC…
Browse files Browse the repository at this point in the history
…_RAW. (#7650)
  • Loading branch information
asfernandes authored Jun 27, 2023
1 parent 54ca5e4 commit dddfcf4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ SINT64 query_performance_counter()

// Use high-resolution clock
struct timespec tp;
if (clock_gettime(CLOCK_REALTIME, &tp) != 0)
if (clock_gettime(CLOCK_MONOTONIC_RAW, &tp) != 0)
return 0;

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

0 comments on commit dddfcf4

Please sign in to comment.