Skip to main content

next_timer_delay_ms

Function next_timer_delay_ms 

Source
pub fn next_timer_delay_ms() -> Option<u64>
Expand description

Milliseconds until the earliest pending timer on the global executor, measured on the installed TimeSource’s axis.

  • Some(0) — a timer has already expired; call flush_all to fire it.
  • Some(n) — the earliest timer fires in n ms; an event-loop host should schedule a wake-up (e.g. winit ControlFlow::WaitUntil) so the flush actually happens at that time.
  • None — no pending timers, or no TimeSource installed (without a TimeSource every timer expires on the next flush anyway).