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.

Object Safety§

This trait is not object safe.

Implementors§