Skip to main content

sleep_until_precise

Function sleep_until_precise 

Source
pub async fn sleep_until_precise(deadline: Instant)
Expand description

Sleep until the specified deadline using timerfd on Linux for precision.

Unlike sleep_precise, this accounts for time already elapsed since the deadline’s reference point, making it suitable for simulation loops where computation time should be subtracted from the sleep.