Difference between revisions of "Timer"
Line 7: | Line 7: | ||
through [[Event.TIMER]] and [[Event.TIMER_COMPLETE]] events.<br /></translate> | through [[Event.TIMER]] and [[Event.TIMER_COMPLETE]] events.<br /></translate> | ||
{|- | {|- | ||
− | | style="width: 50%;"| | + | | style="width: 50%; vertical-align:top;"| |
=== Methods === | === Methods === | ||
− | [[Timer.delayedCall]] | + | [[Timer.delayedCall]] ''<translate>delayed call a function after a set amount of time</translate>''<br/> |
− | [[Timer.new]] | + | [[Timer.new]] ''<translate>creates a new Timer object</translate>''<br/> |
− | [[Timer.pauseAll]] | + | [[Timer.pauseAll]] ''<translate>pause all timers</translate>''<br/> |
− | [[Timer.resumeAll]] | + | [[Timer.resumeAll]] ''<translate>resume all timers</translate>''<br/> |
− | [[Timer.stopAll]] | + | [[Timer.stopAll]] ''<translate>stop all timers</translate>''<br/> |
− | [[Timer:getCurrentCount]] | + | [[Timer:getCurrentCount]] ''<translate>returns the current trigger count of the timer</translate>''<br/> |
− | [[Timer:getDelay]] | + | [[Timer:getDelay]] ''<translate>returns the time interval between timer events in milliseconds</translate>''<br/> |
− | [[Timer:getRepeatCount]] | + | [[Timer:getRepeatCount]] ''<translate>returns the number of repetitions the timer will make</translate>''<br/> |
− | [[Timer:isRunning]] | + | [[Timer:isRunning]] ''<translate>returns the current running status of timer</translate>''<br/> |
− | [[Timer:reset]] | + | [[Timer:reset]] ''<translate>stops the timer and sets the currentCount property to 0</translate>''<br/> |
− | [[Timer:setDelay]] | + | [[Timer:setDelay]] ''<translate>sets the time interval between timer events in milliseconds</translate>''<br/> |
− | [[Timer:setRepeatCount]] | + | [[Timer:setRepeatCount]] ''<translate>sets the number of repetitions the timer will make</translate>''<br/> |
− | [[Timer:start]] | + | [[Timer:start]] ''<translate>starts the timer</translate>''<br/> |
− | [[Timer:stop]] | + | [[Timer:stop]] ''<translate>stops the timer</translate>''<br/> |
− | | style="width: 50%;"| | + | | style="width: 50%; vertical-align:top;"| |
=== Events === | === Events === | ||
[[Event.TIMER]]<br/> | [[Event.TIMER]]<br/> |
Revision as of 14:35, 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 |