dhcp_client_core::deps

Trait Clock

Source
pub trait Clock {
    type Instant: Instant;

    // Required methods
    async fn wait_until(&self, time: Self::Instant);
    fn now(&self) -> Self::Instant;
}
Expand description

Provides access to system-time-related operations.

Required Associated Types§

Source

type Instant: Instant

The type representing monotonic system time.

Required Methods§

Source

async fn wait_until(&self, time: Self::Instant)

Completes once the monotonic system time is at or after the given time.

Source

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

Gets the monotonic system time.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§