pub struct SchedTaskSpinGap { /* private fields */ }Expand description
One sched task spin loop’s scheduled gap. Construct beside the loop, call
SchedTaskSpinGap::after_spin at the bottom of every iteration.
ⓘ
let mut gap = SchedTaskSpinGap::new(sched task.spin_period_us);
loop {
let t0 = gap.mark();
crt.spin_once(period);
gap.after_spin(t0);
}Implementations§
Source§impl SchedTaskSpinGap
impl SchedTaskSpinGap
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SchedTaskSpinGap
impl RefUnwindSafe for SchedTaskSpinGap
impl Send for SchedTaskSpinGap
impl Sync for SchedTaskSpinGap
impl Unpin for SchedTaskSpinGap
impl UnsafeUnpin for SchedTaskSpinGap
impl UnwindSafe for SchedTaskSpinGap
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