pub struct Clock { /* private fields */ }Expand description
Monotonic clock
Implementations§
Source§impl Clock
impl Clock
Sourcepub fn elapsed(&mut self) -> Duration
pub fn elapsed(&mut self) -> Duration
Returns the time elapsed since some arbitrary epoch. The epoch is constant across all
Clock instances for as long as the system runs.
This function is monotonically increasing. Each returned Duration is greater or equal to
any previous Duration returned for the same Clock instance.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Clock
impl RefUnwindSafe for Clock
impl Send for Clock
impl Sync for Clock
impl Unpin for Clock
impl UnsafeUnpin for Clock
impl UnwindSafe for Clock
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