Trait InstantContext

Source
pub trait InstantContext: InstantBindingsTypes {
    // Required method
    fn now(&self) -> Self::Instant;

    // Provided method
    fn now_atomic(&self) -> Self::AtomicInstant { ... }
}
Expand description

A context that provides access to a monotonic clock.

Required Methods§

Source

fn now(&self) -> Self::Instant

Returns the current instant.

now guarantees that two subsequent calls to now will return monotonically non-decreasing values.

Provided Methods§

Source

fn now_atomic(&self) -> Self::AtomicInstant

Returns the current instant, as an [Self::AtomicInstant].

Implementors§

Source§

impl InstantContext for FakeInstantCtx

Source§

impl<Id> InstantContext for FakeTimerCtx<Id>

Source§

impl<TimerId, Event: Debug, State, FrameMeta> InstantContext for FakeBindingsCtx<TimerId, Event, State, FrameMeta>