From e56c207f2c27ef5f919de37e6fb269dfbb12f38e Mon Sep 17 00:00:00 2001 From: Vincent LE GOFF Date: Fri, 10 May 2019 16:48:06 +0200 Subject: [PATCH] benching: use performance.now (denoland/deno_std#385) Original: https://github.com/denoland/deno_std/commit/ad1b95eaf75d0e65367f3ad956a691e9348a2dc5 --- testing/bench.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/bench.ts b/testing/bench.ts index 5b396df0e5..3bb62526d9 100644 --- a/testing/bench.ts +++ b/testing/bench.ts @@ -61,10 +61,10 @@ function assertTiming(clock: BenchmarkClock): void { function createBenchmarkTimer(clock: BenchmarkClock): BenchmarkTimer { return { start(): void { - clock.start = Date.now(); + clock.start = performance.now(); }, stop(): void { - clock.stop = Date.now(); + clock.stop = performance.now(); } }; }