Skip to content

Instantly share code, notes, and snippets.

@brschwar
Last active November 12, 2015 15:20
Show Gist options
  • Save brschwar/93a2f7e4b383bf841ee0 to your computer and use it in GitHub Desktop.
Save brschwar/93a2f7e4b383bf841ee0 to your computer and use it in GitHub Desktop.
"Timer" Feature to Optimize Your Code: Determine how long an operation takes by using "timer" feature to log the results.
function TimeTracker(){
console.time("MyTimer");
for(x=5000; x > 0; x--){}
console.timeEnd("MyTimer");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment