pub struct DelayLog { /* private fields */ }Expand description
A delay that records every wait instead of sleeping.
§Examples
use pamoja_hal::delay::DelayNs;
use pamoja_hal::script::DelayLog;
let mut delay = DelayLog::new();
delay.delay_us(480);
delay.delay_ms(10);
assert_eq!(delay.total_micros(), 10_480);Implementations§
Trait Implementations§
Source§impl DelayNs for DelayLog
impl DelayNs for DelayLog
Source§fn delay_ns(&mut self, ns: u32)
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.Auto Trait Implementations§
impl Freeze for DelayLog
impl RefUnwindSafe for DelayLog
impl Send for DelayLog
impl Sync for DelayLog
impl Unpin for DelayLog
impl UnsafeUnpin for DelayLog
impl UnwindSafe for DelayLog
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