Function x86_64::instructions::rdtsc [] [src]

pub fn rdtsc() -> u64

Read time stamp counters Read the time stamp counter using the RDTSC instruction.

The RDTSC instruction is not a serializing instruction. It does not necessarily wait until all previous instructions have been executed before reading the counter. Similarly, subsequent instructions may begin execution before the read operation is performed. If software requires RDTSC to be executed only after all previous instructions have completed locally, it can either use RDTSCP or execute the sequence LFENCE;RDTSC.