pub trait Timer {
// Required method
async fn sleep_until(&self, at: MonoNs);
}Expand description
The host’s sleep. A host that runs a wait inline returns a future that is ready on its first poll (it slept already); an executor’s timer pends until its deadline.
Required Methods§
Sourceasync fn sleep_until(&self, at: MonoNs)
async fn sleep_until(&self, at: MonoNs)
Resolves once the host clock reads at or later.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".