pub struct LockedClock<const HZ: u32>(Clock<HZ>);
riot_module_ztimer
only.Expand description
A Clock that has been acquired using Clock::acquire() (which is backed by ztimer_acquire). Times from a single acquired clock can be compared.
While time stamps from that clock are protected against cross-frequency comparison, it is up to the user to not mix time stamps from different clocks that happen to have the same frequency, from different times of the timer being locked, and to ensure that wraparounds are considered. While the former two could be addressed by giving this type and its ticks a brand lifetime, the wraparound issue would not be addressed by that anyway.
Tuple Fields§
§0: Clock<HZ>
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<const HZ: u32> Freeze for LockedClock<HZ>
impl<const HZ: u32> RefUnwindSafe for LockedClock<HZ>
impl<const HZ: u32> !Send for LockedClock<HZ>
impl<const HZ: u32> !Sync for LockedClock<HZ>
impl<const HZ: u32> Unpin for LockedClock<HZ>
impl<const HZ: u32> UnwindSafe for LockedClock<HZ>
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
Source§impl<T> IntoSwitch for T
impl<T> IntoSwitch for T
Source§fn into_switch<ActiveLevel>(self) -> Switch<T, ActiveLevel>
fn into_switch<ActiveLevel>(self) -> Switch<T, ActiveLevel>
Source§fn into_active_high_switch(self) -> Switch<Self, ActiveHigh>where
Self: Sized,
fn into_active_high_switch(self) -> Switch<Self, ActiveHigh>where
Self: Sized,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 4 bytes