torrust_clock/clock/working/mod.rs
1use std::time::SystemTime;
2
3use crate::{DurationSinceUnixEpoch, clock};
4
5#[allow(clippy::module_name_repetitions)]
6pub struct WorkingClock;
7
8impl clock::Time for clock::Working {
9 fn now() -> DurationSinceUnixEpoch {
10 SystemTime::now().duration_since(SystemTime::UNIX_EPOCH).unwrap()
11 }
12
13 fn dbg_clock_type() -> String {
14 "Working".to_owned()
15 }
16}