mirror of
https://github.com/cpvalente/ontime.git
synced 2026-07-26 10:38:55 +00:00
fix clock drift (#1531)
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user