Skip to content

Commit

Permalink
switch to Date.now
Browse files Browse the repository at this point in the history
  • Loading branch information
cabanier committed Oct 20, 2023
1 parent 12c8493 commit ed3fbd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions map.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit ed3fbd0

Please sign in to comment.