pub struct FakeClock { /* private fields */ }
Expand description
Struct representing a fake instant
Implementations§
Source§impl FakeClock
impl FakeClock
Sourcepub fn advance_time(millis: u64)
pub fn advance_time(millis: u64)
Advances the thread-local fake time by the given amount of milliseconds
Sourcepub fn duration_since(&self, earlier: &Self) -> Duration
pub fn duration_since(&self, earlier: &Self) -> Duration
Returns the duration that passed between self
and earlier
.
Trait Implementations§
Source§impl Ord for FakeClock
impl Ord for FakeClock
Source§impl PartialOrd for FakeClock
impl PartialOrd for FakeClock
impl Copy for FakeClock
impl Eq for FakeClock
Auto Trait Implementations§
impl Freeze for FakeClock
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)