[ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 /* 2 DynAPI Distribution 3 TimerX Class by Raymond Irving (http://dyntools.shorturl.com) 4 5 The DynAPI Distribution is distributed under the terms of the GNU LGPL license. 6 7 requires: Dynlayer 8 */ 9 10 TimerX = {}; // used by dynapi.library 11 12 p = DynLayer.prototype; 13 p.startTimer=function(interval) { 14 if (this.tickTimer>0) this.stopTimer(); 15 this._timerInterval=interval||5; 16 this._timerTickCount=0; 17 this._timerStoped=false; 18 this._tickTimer=setTimeout(this+'.tickLoop()',this._timerInterval); 19 }; 20 p.tickLoop=function() { 21 if (this._timerStoped==true||this._timerStoped==null) return; 22 this._timerTickCount++; 23 this.invokeEvent("timer"); 24 this._tickTimer=window.setTimeout(this+'.tickLoop()',this._timerInterval); 25 }; 26 p.stopTimer=function() { 27 this._timerStoped=true; 28 clearTimeout(this._tickTimer); 29 }; 30 p.setTimerInterval=function(interval) { 31 this._timerInterval=interval||this._timerInterval; 32 }; 33 p.getTimerInterval=function() { 34 return this._timerInterval; 35 }; 36 p.getTickCount=function() { 37 return this._timerTickCount; 38 }; 39 p.resetTickCount=function() { 40 this._timerTickCount=0; 41 }; 42 43 44
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |