pub struct ClockFreq { /* private fields */ }Expand description
A globally accessible frequency provider for high-precision timing.
ClockFreq stores the hardware clock frequency (typically derived from the CPU TSC)
converted into various time units. These values are used to transform raw hardware
“ticks” into human-readable durations without performing expensive division
in the hot loop of the executor.
§Design
All frequency components are stored as AtomicU64 to ensure thread-safety
(if multiple cores are used) and to allow the values to be initialized at runtime
while remaining in a static context.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ClockFreq
impl RefUnwindSafe for ClockFreq
impl Send for ClockFreq
impl Sync for ClockFreq
impl Unpin for ClockFreq
impl UnwindSafe for ClockFreq
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more