mirror of
https://github.com/denoland/deno.git
synced 2025-08-02 18:12:39 +00:00
Add performance.now (#1633)
This commit is contained in:
parent
e5899b14e2
commit
16ed1f2545
7 changed files with 79 additions and 3 deletions
10
js/performance_test.ts
Normal file
10
js/performance_test.ts
Normal file
|
@ -0,0 +1,10 @@
|
|||
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
||||
import { test, assert } from "./test_util.ts";
|
||||
|
||||
test(function now() {
|
||||
const start = performance.now();
|
||||
setTimeout(() => {
|
||||
const end = performance.now();
|
||||
assert(end - start >= 10);
|
||||
}, 10);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue