pub struct MonoTimer { /* private fields */ }Expand description
A monotonic non-decreasing timer
This uses the timer in the debug watch trace peripheral. This means, that if the core is stopped, the timer does not count up. This may be relevant if you are using cortex_m_semihosting::hprintln for debugging in which case the timer will be stopped while printing
Implementations§
Source§impl MonoTimer
impl MonoTimer
Sourcepub fn frequency(self) -> Hertz
pub fn frequency(self) -> Hertz
Returns the frequency at which the monotonic timer is operating at
pub fn waiter_us<I: Interval>( &self, timeout: MicroSeconds, interval: I, ) -> TickWaiter<DwtInstant, I, u32>
Sourcepub fn waiter_ns<I: Interval>(
&self,
timeout: NanosDurationU64,
interval: I,
) -> TickWaiter<DwtInstant, I, u64>
pub fn waiter_ns<I: Interval>( &self, timeout: NanosDurationU64, interval: I, ) -> TickWaiter<DwtInstant, I, u64>
It can wait longer with a nanosecond timeout.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MonoTimer
impl RefUnwindSafe for MonoTimer
impl Send for MonoTimer
impl Sync for MonoTimer
impl Unpin for MonoTimer
impl UnwindSafe for MonoTimer
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