Struct riot_wrappers::ztimer::Delay
source · pub struct Delay;
Available on crate feature
embedded-hal-async
and riot_module_ztimer_usec
and riot_module_ztimer
only.Expand description
Struct that provides the embedded_hal_async::delay::DelayNs trait
Unlike the Clock structs that can be instanciated for any ZTimer clock, this is clock independent, because the embedded HAL trait offers delay methods that are provided through different global clocks.
§Caveats
RIOT does not provide a general nanosecond clock; nanosecond sleeps are implemented at the microsecond clock, and will pause longer as the trait demands.
Trait Implementations§
source§impl DelayNs for Delay
Available on riot_module_ztimer_msec
only.
impl DelayNs for Delay
Available on
riot_module_ztimer_msec
only.source§async fn delay_ns(&mut self, ns: u32)
async fn delay_ns(&mut self, ns: u32)
Pauses execution for at minimum
ns
nanoseconds. Pause can be longer
if the implementation requires it due to precision/timing issues.impl Copy for Delay
Auto Trait Implementations§
impl RefUnwindSafe for Delay
impl Send for Delay
impl Sync for Delay
impl Unpin for Delay
impl UnwindSafe for Delay
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