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