pub trait Clock {
// Required methods
fn current_time(&self) -> Timestamp;
fn sleep_until<'life0, 'async_trait>(
&'life0 self,
timestamp: Timestamp,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
A clock that can be used to get the current Timestamp.
Required Methods§
Sourcefn current_time(&self) -> Timestamp
fn current_time(&self) -> Timestamp
Returns the current time.