Skip to main content

sleep_until

Function sleep_until 

Source
pub fn sleep_until(deadline_us: u64)
Expand description

Block the calling preemptive task until the absolute time deadline_us (plan.md §5.6 / Phase 11). sleep_ms is sleep_until(now + ms*1000); crate::deadlines::wait_period uses this directly with a drift-corrected deadline so periodic jitter doesn’t accumulate. No-op outside a preemptive task context. If deadline_us has already passed, still yields once (bounded, not a busy spin) rather than returning immediately.