diff options
Diffstat (limited to 'cli/rt')
-rw-r--r-- | cli/rt/11_timers.js | 5 | ||||
-rw-r--r-- | cli/rt/90_deno_ns.js | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/cli/rt/11_timers.js b/cli/rt/11_timers.js index 8f6a7e049..c762c59d8 100644 --- a/cli/rt/11_timers.js +++ b/cli/rt/11_timers.js @@ -20,6 +20,10 @@ return core.jsonOpSync("op_now"); } + function sleepSync(millis = 0) { + return core.jsonOpSync("op_sleep_sync", { millis }); + } + // Derived from https://github.com/vadimg/js_bintrees. MIT Licensed. class RBNode { @@ -545,5 +549,6 @@ opStopGlobalTimer, opStartGlobalTimer, opNow, + sleepSync, }; })(this); diff --git a/cli/rt/90_deno_ns.js b/cli/rt/90_deno_ns.js index 3a41e6bd1..7e8598923 100644 --- a/cli/rt/90_deno_ns.js +++ b/cli/rt/90_deno_ns.js @@ -80,6 +80,7 @@ __bootstrap.denoNs = { listen: __bootstrap.net.listen, connectTls: __bootstrap.tls.connectTls, listenTls: __bootstrap.tls.listenTls, + sleepSync: __bootstrap.timers.sleepSync, }; __bootstrap.denoNsUnstable = { |