Skip to content

Instantly share code, notes, and snippets.

@venil7
Created December 27, 2013 22:16
Show Gist options
  • Save venil7/8153414 to your computer and use it in GitHub Desktop.
Save venil7/8153414 to your computer and use it in GitHub Desktop.
console.log, that prints number of milliseconds since last console.log invocation
console.timed_log = function() {
var args = Array.prototype.splice.call(arguments, 0);
var time = +new Date();
var diff = time - (this._time || time);
args.unshift(diff);
console.log.apply(console, args);
this._time = time;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment