Skip to content

Commit

Permalink
Resolve pc.now to native function (#4162)
Browse files Browse the repository at this point in the history
  • Loading branch information
kungfooman authored Apr 2, 2022
1 parent fc9dcf4 commit a10b2dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/time.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* @returns {number} The time in milliseconds.
* @ignore
*/
const now = (typeof window !== 'undefined') && window.performance && window.performance.now && window.performance.timing ? function () {
return window.performance.now();
} : Date.now;
const now = (typeof window !== 'undefined') && window.performance && window.performance.now && window.performance.timing ?
performance.now.bind(performance) :
Date.now;

/**
* A Timer counts milliseconds from when start() is called until when stop() is called.
Expand Down

0 comments on commit a10b2dd

Please sign in to comment.