mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-31 20:09:11 +00:00
c96151fe2f
pausedAt is now an instant, but getExpectedFinish, getCurrent and getRuntimeOffset were still deriving the pause duration from the time of day clock (clock - pausedAt), which mixes units and produces a garbage result on every paused timer. - derive the ongoing pause from the instant in a single helper, so the duration is correct also when the pause spans midnight - getCurrent no longer special cases a paused timer: it discounts the ongoing pause from the elapsed time, which keeps the midnight correction that the paused branch was missing - reuse timeCore.elapsedTime instead of a local copy of the same logic - type getCurrent as a Duration and getElapsed as Maybe<Duration> to document that these are durations, never points in time - keep _now in parity with the clock in roll() - type the restore point pausedAt as an instant and reject restore points which still carry a time of day, resuming those would corrupt the timer Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019WA6Z38L7VY2oD6B4vG8hn