pub struct StdMonotonicClock { /* private fields */ }Expand description
A real monotonic clock backed by std::time::Instant.
The type intentionally does not implement Clone. Shared identity is
expressed explicitly with Arc<StdMonotonicClock>.
Implementations§
Trait Implementations§
Source§impl Debug for StdMonotonicClock
impl Debug for StdMonotonicClock
Source§impl Default for StdMonotonicClock
impl Default for StdMonotonicClock
Source§impl MonotonicClock for StdMonotonicClock
impl MonotonicClock for StdMonotonicClock
Source§fn domain(&self) -> ClockDomain
fn domain(&self) -> ClockDomain
Source§fn now(&self) -> MonotonicInstant
fn now(&self) -> MonotonicInstant
Returns the current instant in this clock’s domain.
§Returns
The current elapsed duration represented in this clock’s domain.
Source§fn new_timer(&self) -> Arc<dyn Timer> ⓘ
fn new_timer(&self) -> Arc<dyn Timer> ⓘ
Creates a timer retaining this exact standard clock domain and origin.
§Returns
A shared timer backed by one lazy standard scheduler worker.
Source§fn deadline_after(
&self,
duration: Duration,
) -> Result<MonotonicInstant, TimeError>
fn deadline_after( &self, duration: Duration, ) -> Result<MonotonicInstant, TimeError>
Fixes a deadline after a relative duration. Read more
Auto Trait Implementations§
impl Freeze for StdMonotonicClock
impl RefUnwindSafe for StdMonotonicClock
impl Send for StdMonotonicClock
impl Sync for StdMonotonicClock
impl Unpin for StdMonotonicClock
impl UnsafeUnpin for StdMonotonicClock
impl UnwindSafe for StdMonotonicClock
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