Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. // easy
  2. console.time('sss');
  3. someFunction(); // run whatever needs to be timed in between the statements
  4. console.timeEnd('ssss');
  5.  
  6.  
  7. // Standard
  8. var t0 = performance.now();
  9. doSomething();
  10. var t1 = performance.now();
  11. console.log("Call to doSomething took " + (t1 - t0) + " milliseconds.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement