diff options
Diffstat (limited to 'js/performance_test.ts')
-rw-r--r-- | js/performance_test.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/js/performance_test.ts b/js/performance_test.ts new file mode 100644 index 000000000..154dadbbe --- /dev/null +++ b/js/performance_test.ts @@ -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); +}); |