Appearance
cellpack::prof::Clock
Module contract · All interfaces
At a glance
pub struct Clock { /* private fields */ }Run-time clock for profiled runs: the TSC where it is invariant, else nanoseconds since the run started. Readings are converted to time once, when the run reports.
Member index
3 of 3 members
newA clock started now: the TSC where the CPU has an invariant one, else Instant .nowA nonzero reading: the TSC or nanoseconds since the clock started, the low bit always set so zero can mean “no stamp”.nanos_per_tickNanoseconds per tick, measured over the clock’s life so far.
Methods and associated constants
new
pub fn new() -> SelfA clock started now: the TSC where the CPU has an invariant one, else Instant.
now
A nonzero reading: the TSC or nanoseconds since the clock started, the low bit always set so zero can mean “no stamp”.
nanos_per_tick
pub fn nanos_per_tick(&self) -> f64Nanoseconds per tick, measured over the clock’s life so far.
Implemented traits
Contract reference
See the module reference for semantic input/output rules, units, allocation, mutation, failure behavior, and lifetime requirements. Declarations and documented members are synchronized from the crate source.