Skip to content

Instantly share code, notes, and snippets.

View simonlindholm's full-sized avatar

Simon Lindholm simonlindholm

  • Stockholm, Sweden
View GitHub Profile
@simonlindholm
simonlindholm / gist:2878765
Created June 5, 2012 23:24
Firebug profiling code (for issue 1309)
/**
* Time execution of a piece of code, with a user-provided number 'iterations'
* of samples (>= 0), or if 'iterations' is null, just one.
*/
timeExecution = function(context, code, iterations)
{
var userGiven = true;
if (iterations === null)
{
userGiven = false;