summaryrefslogtreecommitdiff
path: root/runtime/js/11_timers.js
diff options
context:
space:
mode:
authorInteon <42113979+inteon@users.noreply.github.com>2021-03-20 17:51:08 +0100
committerGitHub <noreply@github.com>2021-03-20 17:51:08 +0100
commit1251c893212d57303ecdfa8d953d1e487cb7ec7d (patch)
tree80b3a55872db0a4ee0c9e594601d330e39ca4873 /runtime/js/11_timers.js
parent0d26a82ea9169c013e9b0f29c1ec418b28e273cf (diff)
refactor: Move bin ops to deno_core and unify logic with json ops (#9457)
This commit moves implementation of bin ops to "deno_core" crates as well as unifying logic between bin ops and json ops to reuse as much code as possible (both in Rust and JavaScript).
Diffstat (limited to 'runtime/js/11_timers.js')
-rw-r--r--runtime/js/11_timers.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/runtime/js/11_timers.js b/runtime/js/11_timers.js
index f07622388..7a0307c06 100644
--- a/runtime/js/11_timers.js
+++ b/runtime/js/11_timers.js
@@ -4,7 +4,6 @@
((window) => {
const assert = window.__bootstrap.util.assert;
const core = window.Deno.core;
- const { bufferOpSync } = window.__bootstrap.dispatchBuffer;
function opStopGlobalTimer() {
core.jsonOpSync("op_global_timer_stop");
@@ -20,7 +19,7 @@
const nowBytes = new Uint8Array(8);
function opNow() {
- bufferOpSync("op_now", 0, nowBytes);
+ core.binOpSync("op_now", 0, nowBytes);
return new DataView(nowBytes.buffer).getFloat64();
}