summaryrefslogtreecommitdiff
path: root/cli/rt/11_timers.js
diff options
context:
space:
mode:
Diffstat (limited to 'cli/rt/11_timers.js')
-rw-r--r--cli/rt/11_timers.js5
1 files changed, 5 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);