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

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