Skip to content

Instantly share code, notes, and snippets.

@xbklairith
Created March 30, 2017 08:48
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 xbklairith/e56a12f1452f72cdd12b3411a420f800 to your computer and use it in GitHub Desktop.
Save xbklairith/e56a12f1452f72cdd12b3411a420f800 to your computer and use it in GitHub Desktop.
// 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.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment