Difference between revisions of "Timer"
Line 4: | Line 4: | ||
=== Description === | === Description === | ||
<translate><br /> | <translate><br /> | ||
− | The [[Timer]] class is used to execute a code at specified intervals. The listener functions are registered<br /> | + | The [[Special:MyLanguage/Timer|Timer]] class is used to execute a code at specified intervals. The listener functions are registered<br /> |
− | through [[Event.TIMER]] and [[Event.TIMER_COMPLETE]] events.<br /></translate> | + | through [[Special:MyLanguage/Event.TIMER|Event.TIMER]] and [[Special:MyLanguage/Event.TIMER_COMPLETE|Event.TIMER_COMPLETE]] events.<br /></translate> |
{|- | {|- | ||
| style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| | ||
=== Methods === | === Methods === | ||
− | [[Timer.delayedCall]] ''<translate>delayed call a function after a set amount of time</translate>''<br/> | + | [[Special:MyLanguage/Timer.delayedCall|Timer.delayedCall]] ''<translate>delayed call a function after a set amount of time</translate>''<br/> |
− | [[Timer.new]] ''<translate>creates a new Timer object</translate>''<br/> | + | [[Special:MyLanguage/Timer.new|Timer.new]] ''<translate>creates a new Timer object</translate>''<br/> |
− | [[Timer.pauseAll]] ''<translate>pause all timers</translate>''<br/> | + | [[Special:MyLanguage/Timer.pauseAll|Timer.pauseAll]] ''<translate>pause all timers</translate>''<br/> |
− | [[Timer.resumeAll]] ''<translate>resume all timers</translate>''<br/> | + | [[Special:MyLanguage/Timer.resumeAll|Timer.resumeAll]] ''<translate>resume all timers</translate>''<br/> |
− | [[Timer.stopAll]] ''<translate>stop all timers</translate>''<br/> | + | [[Special:MyLanguage/Timer.stopAll|Timer.stopAll]] ''<translate>stop all timers</translate>''<br/> |
− | [[Timer:getCurrentCount]] ''<translate>returns the current trigger count of the timer</translate>''<br/> | + | [[Special:MyLanguage/Timer:getCurrentCount|Timer:getCurrentCount]] ''<translate>returns the current trigger count of the timer</translate>''<br/> |
− | [[Timer:getDelay]] ''<translate>returns the time interval between timer events in milliseconds</translate>''<br/> | + | [[Special:MyLanguage/Timer:getDelay|Timer:getDelay]] ''<translate>returns the time interval between timer events in milliseconds</translate>''<br/> |
− | [[Timer:getRepeatCount]] ''<translate>returns the number of repetitions the timer will make</translate>''<br/> | + | [[Special:MyLanguage/Timer:getRepeatCount|Timer:getRepeatCount]] ''<translate>returns the number of repetitions the timer will make</translate>''<br/> |
− | [[Timer:isRunning]] ''<translate>returns the current running status of timer</translate>''<br/> | + | [[Special:MyLanguage/Timer:isRunning|Timer:isRunning]] ''<translate>returns the current running status of timer</translate>''<br/> |
− | [[Timer:reset]] ''<translate>stops the timer and sets the currentCount property to 0</translate>''<br/> | + | [[Special:MyLanguage/Timer:reset|Timer:reset]] ''<translate>stops the timer and sets the currentCount property to 0</translate>''<br/> |
− | [[Timer:setDelay]] ''<translate>sets the time interval between timer events in milliseconds</translate>''<br/> | + | [[Special:MyLanguage/Timer:setDelay|Timer:setDelay]] ''<translate>sets the time interval between timer events in milliseconds</translate>''<br/> |
− | [[Timer:setRepeatCount]] ''<translate>sets the number of repetitions the timer will make</translate>''<br/> | + | [[Special:MyLanguage/Timer:setRepeatCount|Timer:setRepeatCount]] ''<translate>sets the number of repetitions the timer will make</translate>''<br/> |
− | [[Timer:start]] ''<translate>starts the timer</translate>''<br/> | + | [[Special:MyLanguage/Timer:start|Timer:start]] ''<translate>starts the timer</translate>''<br/> |
− | [[Timer:stop]] ''<translate>stops the timer</translate>''<br/> | + | [[Special:MyLanguage/Timer:stop|Timer:stop]] ''<translate>stops the timer</translate>''<br/> |
| style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| | ||
=== Events === | === Events === | ||
− | [[Event.TIMER]]<br/> | + | [[Special:MyLanguage/Event.TIMER|Event.TIMER]]<br/> |
− | [[Event.TIMER_COMPLETE]]<br/> | + | [[Special:MyLanguage/Event.TIMER_COMPLETE|Event.TIMER_COMPLETE]]<br/> |
=== Constants === | === Constants === | ||
|} | |} |
Revision as of 16:36, 23 August 2018
Supported platforms: android, ios, mac, pc
Available since: Gideros 2011.6
Description
The Timer class is used to execute a code at specified intervals. The listener functions are registered
through Event.TIMER and Event.TIMER_COMPLETE events.
MethodsTimer.delayedCall delayed call a function after a set amount of time |
EventsEvent.TIMER Constants |