Created
May 23, 2013 22:20
-
-
Save wbamberg/5639921 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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