summaryrefslogtreecommitdiff
path: root/ext/web/02_timers.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/web/02_timers.js')
-rw-r--r--ext/web/02_timers.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/web/02_timers.js b/ext/web/02_timers.js
index c224be884..753848af1 100644
--- a/ext/web/02_timers.js
+++ b/ext/web/02_timers.js
@@ -19,6 +19,7 @@ const {
PromisePrototypeThen,
SafeArrayIterator,
SymbolFor,
+ TypedArrayPrototypeGetBuffer,
TypeError,
indirectEval,
} = primordials;
@@ -27,7 +28,7 @@ import { reportException } from "ext:deno_web/02_event.js";
import { assert } from "ext:deno_web/00_infra.js";
const hrU8 = new Uint8Array(8);
-const hr = new Uint32Array(hrU8.buffer);
+const hr = new Uint32Array(TypedArrayPrototypeGetBuffer(hrU8));
function opNow() {
ops.op_now(hrU8);
return (hr[0] * 1000 + hr[1] / 1e6);