Skip to content

Instantly share code, notes, and snippets.

@benschwarz
Created August 4, 2010 01:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save benschwarz/507506 to your computer and use it in GitHub Desktop.
Save benschwarz/507506 to your computer and use it in GitHub Desktop.
Function.prototype.sleep = function (millisecond_delay) {
if(window.sleep_delay != undefined) clearTimeout(window.sleep_delay);
var function_object = this;
window.sleep_delay = setTimeout(function_object, millisecond_delay);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment