Skip to main content

rearm_every_at

Function rearm_every_at 

Source
pub fn rearm_every_at(
    eligible_at_ms: i64,
    interval_ms: i64,
    now_ms: i64,
) -> Option<i64>
Expand description

The next instant a recurring trigger becomes due, given the instant it was due and its cadence.

Missed intervals collapse into one step rather than replaying: a daemon asleep for an hour on a one-minute cadence owes one run, not sixty. The result is always strictly after now_ms, so a rearm can never leave the trigger due again in the same tick.