Last active
October 20, 2018 03:09
-
-
Save rpf5573/015b036c676c8830d545a656fe9eb818 to your computer and use it in GitHub Desktop.
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
const start = process.hrtime(); | |
setTimeout(() => { | |
const end = process.hrtime(start); | |
console.log(`timeout callback executed after ${end[0]}s and ${end[1]/Math.pow(10,9)}ms`); | |
}, 1000); | |
// output | |
// timeout callback executed after 1s and 0.001875707ms |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment