minstant
minstant copied to clipboard
Try to read tsc_freq_khz from kernel if available, for more accurate cycles_per_sec
This repo outlines a method for exporting the TSC frequency in kHz from the linux kernel. If it is available it would be useful to use it. This PR tries to read this value and uses it if available. If not it falls back to the existing calculations.
https://github.com/trailofbits/tsc_freq_khz
Hope this is useful!