Skip to main content

InterruptDrivenTimer

Trait InterruptDrivenTimer 

Source
pub trait InterruptDrivenTimer {
    // Required methods
    fn enable_interrupt(&mut self);
    fn start<T: Into<NanosDurationU32>>(&mut self, timeout: T);
    fn wait(&mut self) -> Result<(), Infallible>;
    fn disable_interrupt(&mut self);
}
Expand description

Specifies a timer that can enable & disable an interrupt that fires when the timer expires

Required Methods§

Source

fn enable_interrupt(&mut self)

Enable the timer interrupt

Source

fn start<T: Into<NanosDurationU32>>(&mut self, timeout: T)

Start the timer with a given timeout in nanoseconds

Source

fn wait(&mut self) -> Result<(), Infallible>

Wait for the timer to finish counting down without blocking.

Source

fn disable_interrupt(&mut self)

Disable the timer interrupt

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§