pub trait Timer:
Clone
+ Send
+ Sync
+ Debug
+ 'static {
type Sleep: Future<Output = ()>;
type Instant: Copy + Debug + Ord + Send + Sync + Add<Duration, Output = Self::Instant> + Sub<Duration, Output = Self::Instant> + Sub<Self::Instant, Output = Duration>;
// Required methods
fn sleep_future(&self, duration: Duration) -> Self::Sleep;
fn now(&self) -> Self::Instant;
}Required Associated Types§
type Sleep: Future<Output = ()>
type Instant: Copy + Debug + Ord + Send + Sync + Add<Duration, Output = Self::Instant> + Sub<Duration, Output = Self::Instant> + Sub<Self::Instant, Output = Duration>
Required Methods§
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.