Add performance.now (#1633)

This commit is contained in:
Dmitry Sharshakov 2019-02-02 09:27:42 +03:00 committed by Ryan Dahl
parent e5899b14e2
commit 16ed1f2545
7 changed files with 79 additions and 3 deletions

10
js/performance_test.ts Normal file
View 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);
});