pub enum ClockSource {
Tsc,
Cntvct,
Instant,
LibcMono,
Mock,
External,
}Expand description
Which underlying source a Clock is actually reading.
Observable per REQ-CLK-003: read cost and source used must be
discoverable — e.g. a CalibratedClock that fell back reports the
fallback, never the counter it failed to use.
Variants§
Tsc
x86_64 rdtsc behind a calibrated multiply-shift.
Cntvct
aarch64 cntvct_el0 behind a calibrated multiply-shift.
Instant
std::time::Instant (the calibrated-clock fallback under std).
LibcMono
clock_gettime(CLOCK_MONOTONIC) via libc (no_std hosts, and the
calibrated-clock fallback under the libc feature).
Mock
Deterministic test clock — the OS is never consulted.
External
Bridged chronoshift::Clock (the chronoshift feature).
Implementations§
Trait Implementations§
Source§impl Clone for ClockSource
impl Clone for ClockSource
impl Copy for ClockSource
Source§impl Debug for ClockSource
impl Debug for ClockSource
impl Eq for ClockSource
Source§impl Hash for ClockSource
impl Hash for ClockSource
Source§impl PartialEq for ClockSource
impl PartialEq for ClockSource
impl StructuralPartialEq for ClockSource
Auto Trait Implementations§
impl Freeze for ClockSource
impl RefUnwindSafe for ClockSource
impl Send for ClockSource
impl Sync for ClockSource
impl Unpin for ClockSource
impl UnsafeUnpin for ClockSource
impl UnwindSafe for ClockSource
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