pub trait Clock:
Send
+ Sync
+ 'static {
// Required methods
fn now(&self) -> Instant;
fn sleep_until(&self, at: Instant) -> BoxFuture<'static, ()>;
}Required Methods§
fn now(&self) -> Instant
Sourcefn sleep_until(&self, at: Instant) -> BoxFuture<'static, ()>
fn sleep_until(&self, at: Instant) -> BoxFuture<'static, ()>
Resolves once now() >= at.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".