TimeProvider

Trait TimeProvider 

Source
pub trait TimeProvider {
    // Required method
    fn duration_since_epoch(&self) -> Duration;
}
Expand description

Trait defining a time provider for LSPS5 service.

This trait is used to provide the current time for LSPS5 service operations and to convert between timestamps and durations.

Required Methods§

Source

fn duration_since_epoch(&self) -> Duration

Get the current time as a duration since the Unix epoch.

Implementors§

Source§

impl TimeProvider for DefaultTimeProvider

Available on crate feature time only.