fix clock drift (#1531)

This commit is contained in:
Alex Christoffer Rasmussen
2025-03-08 18:13:02 +01:00
committed by GitHub
parent 069a003787
commit eab916f410
@@ -39,5 +39,6 @@ export function getShouldTimerUpdate(previousValue: MaybeNumber, currentValue: M
export function getForceUpdate(previousUpdate: number, now: number): boolean {
const isClockBehind = now < previousUpdate;
const hasExceededRate = now - previousUpdate >= timerConfig.notificationRate;
return isClockBehind || hasExceededRate;
const newSeconds = millisToSeconds(previousUpdate) !== millisToSeconds(now);
return isClockBehind || hasExceededRate || newSeconds;
}