Intel/AMD have an inst that returns the num of CPU cycles since boot.  This is not a steady, calibrated real time value.    Zeal
OS measures it and you can convert with counts.time_stamp_freq, a value continuously calibrated from other counts.