Skip to content

Instantly share code, notes, and snippets.

@wbamberg
Created May 23, 2013 22:20
Show Gist options
  • Save wbamberg/5639921 to your computer and use it in GitHub Desktop.
Save wbamberg/5639921 to your computer and use it in GitHub Desktop.
var clickme = document.getElementById('clickme');
var started = false;
var profileName = "Profile 1";
clickme.onclick = function() {
if (!started) {
clickme.innerHTML = "Stop";
started = true;
console.profile(profileName);
console.log("starting profile: " + profileName);
}
else {
clickme.innerHTML = "Start";
started = false;
console.profileEnd(profileName);
console.log("stopping profile: " + profileName);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment