stak_time/clock/
void.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use crate::Clock;
use core::convert::Infallible;
use stak_vm::Number;

/// A void clock stopped a fixed time.
#[derive(Debug, Default)]
pub struct VoidClock {}

impl VoidClock {
    /// Creates a clock.
    pub const fn new() -> Self {
        Self {}
    }
}

impl Clock for VoidClock {
    type Error = Infallible;

    fn current_jiffy(&self) -> Result<Number, Self::Error> {
        Ok(Default::default())
    }
}