Skip to content

Instantly share code, notes, and snippets.

@nulltier
Created March 15, 2018 09:23
Show Gist options
  • Save nulltier/1b52f0b891b39f2a24563099fc01615f to your computer and use it in GitHub Desktop.
Save nulltier/1b52f0b891b39f2a24563099fc01615f to your computer and use it in GitHub Desktop.
check performance for a sync code
function measureTime (fn) {
var start = performance.now();
fn();
return performance.now() - start;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment