From 943b0980c7ff97cb6096291efa5e3d5dbfe10805 Mon Sep 17 00:00:00 2001 From: William Perron Date: Thu, 15 Oct 2020 21:06:31 -0400 Subject: feat(cli/ops): add the sleep_sync op (#7974) --- cli/rt/11_timers.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cli/rt/11_timers.js') 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); -- cgit v1.2.3