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