diff --git a/packages/bench/src/now.ts b/packages/bench/src/now.ts index f8bce28416..0f637b0811 100644 --- a/packages/bench/src/now.ts +++ b/packages/bench/src/now.ts @@ -20,13 +20,13 @@ export const now: Fn0 = : () => Date.now() * 1e6; /** - * Returns the difference in milliseconds between 2 given - * {@link Timestamp}s. + * Returns the difference in milliseconds between 2 given {@link Timestamp}s. + * `b` defaults to result of {@link now}. * * @param a * @param b */ -export const timeDiff: FnU2 = (a, b) => +export const timeDiff: FnU2 = (a, b = now()) => (typeof BigInt !== "undefined" ? Number(b - a) : b - a) * 1e-6;