summaryrefslogtreecommitdiff
path: root/js/performance_test.ts
blob: 8f9dbc99019be21d52ca5168d06d5d3357328816 (plain)
1
2
3
4
5
6
7
8
9
10
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import { testPerm, assert } from "./test_util.ts";

testPerm({ highPrecision: false }, function now() {
  const start = performance.now();
  setTimeout(() => {
    const end = performance.now();
    assert(end - start >= 10);
  }, 10);
});