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§
Required Methods§
Sourceasync fn wait_until(&self, time: Self::Instant)
async fn wait_until(&self, time: Self::Instant)
Completes once the monotonic system time is at or after the given 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.