Struct embassy_time::Delay
source · [−]pub struct Delay;Expand description
Type implementing async delays and blocking embedded-hal delays.
The delays are implemented in a “best-effort” way, meaning that the cpu will block for at least the amount provided, but accuracy can be affected by many factors, including interrupt usage. Make sure to use a suitable tick rate for your use case. The tick rate is defined by the currently active driver.
Trait Implementations
sourceimpl DelayUs for Delay
impl DelayUs for Delay
sourceimpl DelayUs for Delay
impl DelayUs for Delay
type Error = Infallible
type Error = Infallible
Enumeration of errors
type DelayUsFuture<'a>
where
Self: 'a = impl Future<Output = Result<(), <Delay as DelayUs>::Error>> + 'a
type DelayUsFuture<'a>
where
Self: 'a = impl Future<Output = Result<(), <Delay as DelayUs>::Error>> + 'a
The future returned by the
delay_us function.sourcefn delay_us(&mut self, micros: u32) -> Self::DelayUsFuture<'_>
fn delay_us(&mut self, micros: u32) -> Self::DelayUsFuture<'_>
Pauses execution for at minimum
us microseconds. Pause can be longer
if the implementation requires it due to precision/timing issues. Read moretype DelayMsFuture<'a>
where
Self: 'a = impl Future<Output = Result<(), <Delay as DelayUs>::Error>> + 'a
type DelayMsFuture<'a>
where
Self: 'a = impl Future<Output = Result<(), <Delay as DelayUs>::Error>> + 'a
The future returned by the
delay_ms function.sourcefn delay_ms(&mut self, millis: u32) -> Self::DelayMsFuture<'_>
fn delay_ms(&mut self, millis: u32) -> Self::DelayMsFuture<'_>
Pauses execution for at minimum
ms milliseconds. Pause can be longer
if the implementation requires it due to precision/timing issues. Read moreAuto Trait Implementations
impl RefUnwindSafe for Delay
impl Send for Delay
impl Sync for Delay
impl Unpin for Delay
impl UnwindSafe for Delay
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more