Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // easy
- console.time('sss');
- someFunction(); // run whatever needs to be timed in between the statements
- console.timeEnd('ssss');
- // Standard
- var t0 = performance.now();
- doSomething();
- var t1 = performance.now();
- console.log("Call to doSomething took " + (t1 - t0) + " milliseconds.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement