fix(progress): measure delivery intervals with a monotonic clock

This commit is contained in:
morluto
2026-10-13 15:23:56 +08:00
parent eaa9616585
commit ed881c6d2e
+1 -1
View File
@@ -23,7 +23,7 @@ export const createProgressReporter = (
} = {},
): ProgressReporter => {
const minimumIntervalMs = options.minimumIntervalMs ?? 100;
const now = options.now ?? Date.now;
const now = options.now ?? (() => performance.now());
let lastCompleted = -1;
let lastSentAt = Number.NEGATIVE_INFINITY;
let sequence = 0;