pub struct FixedClock { /* private fields */ }Expand description
Deterministic clock for tests and reproducible harnesses.
Implementations§
Trait Implementations§
Source§impl Clock for FixedClock
impl Clock for FixedClock
Source§fn monotonic_millis(&self) -> u64
fn monotonic_millis(&self) -> u64
Monotonic milliseconds used for elapsed-duration measurements.
Source§fn epoch_seconds(&self) -> u64
fn epoch_seconds(&self) -> u64
Unix epoch seconds used for wall-clock timestamps.
Source§impl Clone for FixedClock
impl Clone for FixedClock
Source§fn clone(&self) -> FixedClock
fn clone(&self) -> FixedClock
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FixedClock
impl RefUnwindSafe for FixedClock
impl Send for FixedClock
impl Sync for FixedClock
impl Unpin for FixedClock
impl UnsafeUnpin for FixedClock
impl UnwindSafe for FixedClock
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