pub struct LevelWakeTimes { /* private fields */ }Expand description
Each level’s next timer deadline, as the low 32 bits of a microsecond clock, compared by wrapping difference: 32-bit atomics, since a Cortex-M3 has no 64-bit ones.
Implementations§
Source§impl LevelWakeTimes
impl LevelWakeTimes
Sourcepub const HORIZON_US: u32
pub const HORIZON_US: u32
The furthest a deadline is armed ahead: half the 32-bit microsecond range (~35 min), so a wrapping difference stays unambiguous. A longer one wakes the level early and it re-arms the rest.
Sourcepub fn set_boot(&self, level: u8)
pub fn set_boot(&self, level: u8)
Which level boots. Its deadline never arms the wake: its own timers bound its own park.
Sourcepub fn set(&self, level: u8, after_us: Option<u64>, now: u32)
pub fn set(&self, level: u8, after_us: Option<u64>, now: u32)
Record level’s next deadline, after_us microseconds after now
(None: its band arms no timer).
Sourcepub fn soonest_after(&self, now: u32) -> Option<u32>
pub fn soonest_after(&self, now: u32) -> Option<u32>
Microseconds from now to the earliest armed non-boot deadline (0 when
one is already due); None when none is armed.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for LevelWakeTimes
impl RefUnwindSafe for LevelWakeTimes
impl Send for LevelWakeTimes
impl Sync for LevelWakeTimes
impl Unpin for LevelWakeTimes
impl UnsafeUnpin for LevelWakeTimes
impl UnwindSafe for LevelWakeTimes
Blanket Implementations§
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