pub trait BlockingClock: Clock {
// Required method
fn blocking_sleep(&self, dur: Duration);
}
Expand description
A BlockingClock
is a Clock
which supports synchronous sleeping.
Required Methods§
Sourcefn blocking_sleep(&self, dur: Duration)
fn blocking_sleep(&self, dur: Duration)
Sleeps and blocks the current thread for the given duration.
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.