pub struct StdClock { /* private fields */ }Expand description
Monotonic clock backed by std::time::Instant.
Implements Clock::poll_delay_until using tokio::time::Sleep so that
the MAC coordinator can efficiently await timer deadlines.
Implementations§
Source§impl StdClock
impl StdClock
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a clock whose epoch starts at construction time.
Clock::now_ms is specified as milliseconds since boot, so a
host that answers PROP_UPTIME must construct this when the thing
it stands for comes up rather than lazily on first use. Cloning
preserves the origin, so handing copies around is safe.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for StdClock
impl !RefUnwindSafe for StdClock
impl Send for StdClock
impl !Sync for StdClock
impl Unpin for StdClock
impl !UnwindSafe for StdClock
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)