1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! Dummy Timer

use core::{task, time};
use core::future::Future;
use core::pin::Pin;

///Dummy Timer
pub struct DummyTimer;

impl super::Oneshot for DummyTimer {
    fn new(_: time::Duration) -> Self {
        unimplemented!();
    }

    fn is_ticking(&self) -> bool {
        false
    }

    fn is_expired(&self) -> bool {
        false
    }

    fn cancel(&mut self) {
        unimplemented!();
    }

    fn restart(&mut self, _: &time::Duration, _: &task::Waker) {
        unimplemented!();
    }
}

impl Future for DummyTimer {
    type Output = ();

    fn poll(self: Pin<&mut Self>, _: &mut task::Context) -> task::Poll<Self::Output> {
        unimplemented!();
    }
}