Skip to main content

initial_schedule_cursor

Function initial_schedule_cursor 

Source
fn initial_schedule_cursor(
    start_secs: i64,
    interval_secs: i64,
) -> Result<i64, Error>
Expand description

Initial scheduler cursor for start_scheduled_loop: exactly one interval before start_secs so the first due scheduled time is start_secs itself.

Fallible: a start_secs - interval_secs difference that does not fit in i64 is an explicit error instead of a saturated cursor that would make the first due scheduled time start_secs + interval_secs and silently skip the start_secs tick.