pub struct TestWallClock { /* private fields */ }Expand description
An explicit wall-clock projection of one TestSimulator’s virtual time.
Production code must supply its own clock. This type is intentionally not installed into a Driver or selected from a Plan; a test passes it only to a test-support seam that explicitly accepts a clock.
Implementations§
Source§impl TestWallClock
impl TestWallClock
Sourcepub const fn epoch(&self) -> SystemTime
pub const fn epoch(&self) -> SystemTime
Returns the explicitly configured instant at virtual instant zero.
Sourcepub fn now(&self) -> Option<SystemTime>
pub fn now(&self) -> Option<SystemTime>
Returns the current wall-clock instant derived from virtual time.
None means the explicit epoch plus virtual duration is out of range;
this method never consults the host wall clock.
Trait Implementations§
Source§impl Clone for TestWallClock
impl Clone for TestWallClock
Auto Trait Implementations§
impl !RefUnwindSafe for TestWallClock
impl !Send for TestWallClock
impl !Sync for TestWallClock
impl !UnwindSafe for TestWallClock
impl Freeze for TestWallClock
impl Unpin for TestWallClock
impl UnsafeUnpin for TestWallClock
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