torrust_tracker_clock::clock

Trait Time

source
pub trait Time: Sized {
    // Required methods
    fn now() -> DurationSinceUnixEpoch;
    fn dbg_clock_type() -> String;

    // Provided methods
    fn now_add(add_time: &Duration) -> Option<DurationSinceUnixEpoch> { ... }
    fn now_sub(sub_time: &Duration) -> Option<DurationSinceUnixEpoch> { ... }
}
Expand description

Trait for types that can be used as a timestamp clock.

Required Methods§

Provided Methods§

Object Safety§

This trait is not object safe.

Implementors§