summaryrefslogtreecommitdiff
path: root/cli/rt/11_timers.js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-09-16 22:22:43 +0200
committerGitHub <noreply@github.com>2020-09-16 22:22:43 +0200
commit6c4da0e429eb47dae6a220c5576a39f137615bb8 (patch)
treea8715428caea00105acc9a10fcd0f356085d3fa7 /cli/rt/11_timers.js
parent104aebdfb5d01f7482bacef6d58c2ce16da44334 (diff)
refactor: remove dispatch_json.js from cli/rt and cli/tsc (#7521)
Instead use Deno.core.jsonOpSync and Deno.core.jsonOpAsync
Diffstat (limited to 'cli/rt/11_timers.js')
-rw-r--r--cli/rt/11_timers.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/rt/11_timers.js b/cli/rt/11_timers.js
index 519a2f461..ee909dbd9 100644
--- a/cli/rt/11_timers.js
+++ b/cli/rt/11_timers.js
@@ -2,18 +2,18 @@
((window) => {
const assert = window.__bootstrap.util.assert;
- const dispatchJson = window.__bootstrap.dispatchJson;
+ const core = window.Deno.core;
function opStopGlobalTimer() {
- dispatchJson.sendSync("op_global_timer_stop");
+ core.jsonOpSync("op_global_timer_stop");
}
async function opStartGlobalTimer(timeout) {
- await dispatchJson.sendAsync("op_global_timer", { timeout });
+ await core.jsonOpAsync("op_global_timer", { timeout });
}
function opNow() {
- return dispatchJson.sendSync("op_now");
+ return core.jsonOpSync("op_now");
}
// Derived from https://github.com/vadimg/js_bintrees. MIT Licensed.