Created
December 23, 2014 04:14
-
-
Save tomykaira/d6f14cdb17ece8fd623d to your computer and use it in GitHub Desktop.
Measure elapsed time in JS (node.js etc)
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
times = 1000000; | |
console.time('global'); | |
for (i = 0; i < times; ++i) { | |
// do something | |
} | |
console.timeEnd('global'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment