From ed3fbd0baf0f88d64b299b1b9e6670758cfd8b00 Mon Sep 17 00:00:00 2001 From: Rik Cabanier Date: Fri, 20 Oct 2023 16:35:06 +0000 Subject: [PATCH] switch to Date.now --- map.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/map.js b/map.js index 84997c5..a5c1bf9 100644 --- a/map.js +++ b/map.js @@ -52,11 +52,11 @@ AFRAME.registerComponent("map", { } - this.XRStart = performance.now(); + this.XRStart = Date.now(); }); document.querySelector('a-scene').addEventListener('exit-vr', function () { - let d = Math.floor((performance.now() - this.XRStart)/1000); + let d = Math.floor((Date.now() - this.XRStart)/1000); let timeSpent = "unknown"; if (d < 30) timeSpent = "< 30 seconds";