Created
October 7, 2015 19:34
-
-
Save catdad/2c18073afc5869dd77a3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| var start = process.hrtime(); | |
| // do work here | |
| var diff = process.hrtime(start); | |
| var nano = diff[0] * 1e9 + diff[1]; | |
| console.log('benchmark took %d nanoseconds', nano); | |
| console.log('benchmark took %d milliseconds', nano * 1e-6); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment