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 BirsdayTimer (interval,checkUpdateTime,nTimeWeight,func) { | |
| this.func = func; | |
| this.nTimeWeight = nTimeWeight; | |
| this.interval = interval; | |
| this.checkUpdateTime = checkUpdateTime; | |
| } | |
| BirsdayTimer.prototype.haisur = function(){ | |
| this.execTime = this.execTime || +new Date(), | |
| this.updateTime = this.updateTime || this.execTime, | |
| curTime = +new Date(), |
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 Interval(func,duration){ | |
| if(typeof func !== "function") throw new TypeError("Expected function"); | |
| else if(typeof duration !== "number") throw new TypeError("Expected number"); | |
| this.func = func; | |
| this.duration = duration; | |
| this.baseline = +new Date(); | |
| (function(_this){ | |
| _this.timer = setTimeout(function(){ |
NewerOlder