Skip to main content

missed_slots

Function missed_slots 

Source
pub fn missed_slots(
    schedule: &JobSchedule,
    base_ms: i64,
    now_ms: i64,
    cap: usize,
) -> Option<(i64, Option<(i64, i64)>)>
Expand description

Missed slots of a job’s schedule after base_ms and before now_ms: the newest, and the earlier ones as (first, count). The newest is the schedule’s last slot before now, found directly, so it is right after any downtime; only the count of earlier ones stops at cap, so a one-minute job off for a year costs bounded work.