pub struct FakeClock {
epoch: Instant,
ns_since_epoch: u64,
deadlines: Vec<(u64, Event)>,
}
Expand description
A fake clock that can be used in tests to give exact control over the time. For a code example, see the tests in base/src/timer.rs.
Fields§
§epoch: Instant
§ns_since_epoch: u64
§deadlines: Vec<(u64, Event)>
Implementations§
source§impl FakeClock
impl FakeClock
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for FakeClock
impl Send for FakeClock
impl Sync for FakeClock
impl Unpin for FakeClock
impl UnwindSafe for FakeClock
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