instant_timer/
lib.rs

1#![no_std]
2use embedded_hal::timer::{CountDown, Periodic};
3
4use void::Void;
5pub struct InstantTimer {}
6
7impl CountDown for InstantTimer {
8    type Time = Void;
9
10    fn start<T>(&mut self, _timeout: T)
11    where
12        T: Into<Void>,
13    {
14    }
15    fn wait(&mut self) -> nb::Result<(), Void> {
16        Ok(())
17    }
18}
19
20impl Periodic for InstantTimer {}