Advertisement
Guest User

Untitled

a guest
Aug 21st, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. var start = new Date();
  2. var hrstart = process.hrtime();
  3.  
  4. setTimeout(function (argument) {
  5. // execution time simulated with setTimeout function
  6. var end = new Date() - start,
  7. hrend = process.hrtime(hrstart);
  8.  
  9. console.info("Execution time: %dms", end);
  10. console.info("Execution time (hr): %ds %dms", hrend[0], hrend[1]/1000000);
  11. }, 1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement