pub trait SystemClock {
// Required method
fn elapsed(&self) -> Duration;
}Expand description
Something which records the elapsed real time.
This uses shared references because it may be shared between multiple components at any one time.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<'a, C: SystemClock> SystemClock for &'a C
impl<'a, C: SystemClock> SystemClock for &'a C
Implementors§
impl SystemClock for OperatingSystemClock
Available on crate feature
std only.