netstack3_base

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§