stak_time/clock/void.rs
1use crate::Clock;
2use core::convert::Infallible;
3
4/// A void clock stopped a fixed time.
5#[derive(Debug, Default)]
6pub struct VoidClock {}
7
8impl VoidClock {
9 /// Creates a clock.
10 pub const fn new() -> Self {
11 Self {}
12 }
13}
14
15impl Clock for VoidClock {
16 type Error = Infallible;
17
18 fn current_jiffy(&self) -> Result<u64, Self::Error> {
19 Ok(Default::default())
20 }
21
22 fn jiffies_per_second(&self) -> u64 {
23 1
24 }
25}