pub struct SystemClock;Expand description
Production clock backed by std::time and futures_timer.
Trait Implementations§
Source§impl Clock for SystemClock
impl Clock for SystemClock
Source§fn now(&self) -> Instant
fn now(&self) -> Instant
Monotonic timestamp suitable for measuring durations between two reads.
Source§fn delay(&self, dur: Duration) -> BoxedDelay
fn delay(&self, dur: Duration) -> BoxedDelay
Future that resolves after
dur has elapsed in this clock’s frame.Source§fn duration_since_epoch(&self) -> Duration
fn duration_since_epoch(&self) -> Duration
Wall-clock duration since the UNIX epoch. Used for slot math and persistence
timestamps; not monotonic. Callers pick a granularity (
as_secs, as_millis)
at the call site.Auto Trait Implementations§
impl Freeze for SystemClock
impl RefUnwindSafe for SystemClock
impl Send for SystemClock
impl Sync for SystemClock
impl Unpin for SystemClock
impl UnwindSafe for SystemClock
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