diff --git a/TUICallKit-Vue3/hooks/useMetronome.ts b/TUICallKit-Vue3/hooks/useMetronome.ts index 8bbaa905..34b24199 100644 --- a/TUICallKit-Vue3/hooks/useMetronome.ts +++ b/TUICallKit-Vue3/hooks/useMetronome.ts @@ -142,8 +142,7 @@ export function useMetronome(options: MetronomeOptions = {}) { beatIndex.value++ nextTickAt += intervalMs.value - const drift = Date.now() - nextTickAt - const nextDelay = Math.max(0, intervalMs.value - drift) + const nextDelay = Math.max(0, nextTickAt - Date.now()) timer = setTimeout(tick, nextDelay) }