pub struct Timer { /* private fields */ }
Implementations§
Source§impl Timer
impl Timer
pub fn new(timer: HardwareCPU) -> Self
pub fn enable(&mut self)
pub fn since_boot(&self) -> Duration
pub fn after(&mut self, duration: Duration, callback: impl Fn() + 'static)
pub fn every(&mut self, duration: Duration, callback: impl Fn() + 'static)
pub fn handle_irq(&mut self)
pub fn set_irq_enable(&mut self, enable: bool)
pub fn irq(&self) -> IrqConfig
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Timer
impl !RefUnwindSafe for Timer
impl Unpin for Timer
impl !UnwindSafe for Timer
Blanket Implementations§
Source§impl<T> Background for T
impl<T> Background for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more