Skip to content

Instantly share code, notes, and snippets.

@rpf5573
Last active October 20, 2018 03:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rpf5573/015b036c676c8830d545a656fe9eb818 to your computer and use it in GitHub Desktop.
Save rpf5573/015b036c676c8830d545a656fe9eb818 to your computer and use it in GitHub Desktop.
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