Last active
August 29, 2015 14:21
-
-
Save chentsulin/452d7d0741b62b42965e to your computer and use it in GitHub Desktop.
Add Timer Spy on setTimeout and setInterval
This file contains 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
var _setT = setTimeout; | |
setTimeout = function() { | |
console.log('setTimeout'); | |
console.log(arguments); | |
_setT.apply(this, arguments); | |
}; | |
var _setI = setInterval; | |
setInterval = function() { | |
console.log('setInterval'); | |
console.log(arguments); | |
_setI.apply(this, arguments); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment