summaryrefslogtreecommitdiff
path: root/js/performance_test.ts
blob: 1238a3836b5587a35192cd65ab261da34abea66f (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(): void {
  const start = performance.now();
  setTimeout((): void => {
    const end = performance.now();
    assert(end - start >= 10);
  }, 10);
});