[][src]Function safe_arch::read_timestamp_counter

pub fn read_timestamp_counter() -> u64

Reads the CPU's timestamp counter value.

This is a monotonically increasing time-stamp that goes up every clock cycle of the CPU. However, since modern CPUs are variable clock rate depending on demand this can't actually be used for telling the time. It also does not fully serialize all operations, so previous instructions might still be in progress when this reads the timestamp.

  • Intrinsic: _rdtsc
  • Assembly: rdtsc