Is there an equivalent C function in linux for reading the CPU counter and its frequency?
I am looking for something similair to QueryPerformanceCounter function that reads the 64bit counter in modern CPU's
clock_gettime(2)
, with an argument of CLOCK_REALTIME_HR
.
clock_gettime() with CLOCK_MONOTONIC_RAW
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With