pub trait Clock:
Send
+ Sync
+ 'static {
// Required methods
fn now_ms(&self) -> u64;
fn after_ms(&self, delay_ms: u64, task: Box<dyn FnOnce() + Send>);
}Expand description
Time source for providers that answer later. Scenarios inject a
ManualClock to decide the order of completions.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".