Skip to content

Switch Linux performance counter timer to CLOCK_MONOTONIC_RAW #7649

@asfernandes

Description

@asfernandes

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions