Created
August 25, 2009 22:37
-
-
Save anotherjesse/175091 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| function setTimeout(callback, ms) { | |
| var _timer = Cc['@mozilla.org/timer;1'] | |
| .createInstance(Ci.nsITimer); | |
| _timer.initWithCallback({notify: callback}, ms, Ci.nsITimer.TYPE_ONE_SHOT); | |
| return _timer; | |
| } | |
| function clearTimeout(timer) { | |
| timer.cancel(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment