mirror of
https://github.com/denoland/deno.git
synced 2024-11-23 15:16:54 -05:00
benching: use performance.now (denoland/deno_std#385)
Original: ad1b95eaf7
This commit is contained in:
parent
480b9e71ff
commit
e56c207f2c
1 changed files with 2 additions and 2 deletions
|
@ -61,10 +61,10 @@ function assertTiming(clock: BenchmarkClock): void {
|
||||||
function createBenchmarkTimer(clock: BenchmarkClock): BenchmarkTimer {
|
function createBenchmarkTimer(clock: BenchmarkClock): BenchmarkTimer {
|
||||||
return {
|
return {
|
||||||
start(): void {
|
start(): void {
|
||||||
clock.start = Date.now();
|
clock.start = performance.now();
|
||||||
},
|
},
|
||||||
stop(): void {
|
stop(): void {
|
||||||
clock.stop = Date.now();
|
clock.stop = performance.now();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue