pub trait Clock:
Send
+ Sync
+ 'static {
// Required method
fn now(&self) -> SystemTime;
}Expand description
A source of wall-clock time.
Required Methods§
Sourcefn now(&self) -> SystemTime
fn now(&self) -> SystemTime
The current time.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<C: Clock> Clock for Arc<C>
Lets a test keep a handle to a clock it gave to a runtime.
impl<C: Clock> Clock for Arc<C>
Lets a test keep a handle to a clock it gave to a runtime.