Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch Linux performance counter timer to CLOCK_MONOTONIC_RAW #7649

Closed
asfernandes opened this issue Jun 25, 2023 · 0 comments · Fixed by #7650
Closed

Switch Linux performance counter timer to CLOCK_MONOTONIC_RAW #7649

asfernandes opened this issue Jun 25, 2023 · 0 comments · Fixed by #7650

Comments

@asfernandes
Copy link
Member

Accordingly to https://stackoverflow.com/questions/3523442/difference-between-clock-realtime-and-clock-monotonic,
CLOCK_REALTIME is related to system time and may even jumps backward, while CLOCK_MONOTONIC is related to time passed since boot and cannot go back.

Given this definition, query_performance_counter() is using wrong clock source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment