diff options
author | Aaron O'Mullan <aaron.omullan@gmail.com> | 2021-04-03 20:35:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-03 20:35:28 +0200 |
commit | 824bd2f5c353f8b0893d626858bcf46e15ce4d0e (patch) | |
tree | 02426615526ea584591d2dbc1af9bab60e5c1007 /runtime/js | |
parent | d2fbbfbbf3cab6ddce4b55200dd4bdfa0ca66a1f (diff) |
refactor: Switch op_now to be a json-op (#9974)
Diffstat (limited to 'runtime/js')
-rw-r--r-- | runtime/js/11_timers.js | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/runtime/js/11_timers.js b/runtime/js/11_timers.js index 7a0307c06..200c764b7 100644 --- a/runtime/js/11_timers.js +++ b/runtime/js/11_timers.js @@ -17,10 +17,8 @@ await core.jsonOpAsync("op_global_timer"); } - const nowBytes = new Uint8Array(8); function opNow() { - core.binOpSync("op_now", 0, nowBytes); - return new DataView(nowBytes.buffer).getFloat64(); + return core.jsonOpSync("op_now"); } function sleepSync(millis = 0) { |