Skip to main content

reanchor_intervals_to

Function reanchor_intervals_to 

Source
pub fn reanchor_intervals_to(t: &mut BreakTimers, now: Instant)
Expand description

Re-anchor the micro / long interval clocks to now and clear the deferral / postpone / warn state, without disturbing last_sleep, active_break, or the fixed-time dedupe keys. now is injected so the re-anchor is a pure function over BreakTimers and a timestamp.

Used on two paths that both want “fresh intervals from this instant”: a profile switch (reset_timers_keep_sleep) and a resume from pause (reanchor_intervals_on_resume). Sleep/bedtime semantics and any fixed-time schedule survive untouched — only the interval anchors and their per-cycle flags move.