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