Created
January 3, 2015 16:00
-
-
Save afonsomatos/274e9ac9a064f9251d2d to your computer and use it in GitHub Desktop.
Most accurate javascript timing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Most accurate javascript timing | |
now = function() { | |
return performance.now()|| | |
performance.mozNow() || | |
performance.msNow() || | |
performance.oNow() || | |
performance.webkitNow() || | |
Date.now() || | |
new Date().getTime(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment