pub struct ManualClock { /* private fields */ }Expand description
Deterministic clock for tests and loom models.
The clock starts at the Instant captured at construction
time and advances only when callers invoke
ManualClock::advance. Internally the offset is stored as
nanoseconds in an AtomicU64, so the clock is Send + Sync
and can be shared across threads (or loom-modelled threads)
without further wrapping.
Implementations§
Source§impl ManualClock
impl ManualClock
Trait Implementations§
Source§impl Clock for ManualClock
impl Clock for ManualClock
Source§impl Debug for ManualClock
impl Debug for ManualClock
Auto Trait Implementations§
impl !Freeze for ManualClock
impl RefUnwindSafe for ManualClock
impl Send for ManualClock
impl Sync for ManualClock
impl Unpin for ManualClock
impl UnsafeUnpin for ManualClock
impl UnwindSafe for ManualClock
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