Trait netstack3_base::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].

Object Safety§

This trait is not object safe.

Implementors§