Add SetGlobalTimeout().

To be used for a timers implementation soon.
This commit is contained in:
Ryan Dahl 2018-09-24 22:46:36 -04:00
parent 4fd2b19f64
commit b088b58f76
6 changed files with 33 additions and 0 deletions

View file

@ -1,4 +1,5 @@
import { test, assertEqual } from "./test_util.ts";
import { setGlobalTimeout } from "deno";
function deferred() {
let resolve;
@ -95,3 +96,7 @@ test(async function intervalCancelInvalidSilentFail() {
// Should silently fail (no panic)
clearInterval(2147483647);
});
test(async function SetGlobalTimeoutSmoke() {
setGlobalTimeout(50);
});