Skip to main content

resumed_after_gap

Function resumed_after_gap 

Source
fn resumed_after_gap(
    prev_wall: SystemTime,
    now_wall: SystemTime,
    threshold: Duration,
) -> bool
Expand description

Whether the gap between the previous tick’s wall clock and now indicates a wake from suspend (or a forward clock leap). Pulled out of the loop body so the threshold logic is unit-testable without driving the 1Hz loop. A backwards clock step yields Err from duration_since and is treated as “not resumed”.