Skip to content

Instantly share code, notes, and snippets.

@Yoshyn
Created April 19, 2016 09:57
Show Gist options
  • Save Yoshyn/146512ab4332f46855d133211a32f73f to your computer and use it in GitHub Desktop.
Save Yoshyn/146512ab4332f46855d133211a32f73f to your computer and use it in GitHub Desktop.
start_time_record = window.performance.now();
MY CODE TO PERFORM
end_time_record = window.performance.now();
function_as_string = arguments.callee.toString()
console.log(function_as_string.substr(0, function_as_string.indexOf('{')) + '(+' + (end_time_record - start_time_record) + ' ms)');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment