Difference between revisions of "Timer"
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
+ | <!-- GIDEROSOBJ:Timer --> | ||
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/> | '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/> | ||
'''<translate>Available since</translate>:''' Gideros 2011.6<br/> | '''<translate>Available since</translate>:''' Gideros 2011.6<br/> | ||
Line 10: | Line 11: | ||
| style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| | ||
=== <translate>Methods</translate> === | === <translate>Methods</translate> === | ||
− | [[Special:MyLanguage/Timer.delayedCall|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/><!-- GIDEROSMTD:Timer.delayedCall --> |
− | [[Special:MyLanguage/Timer.new|Timer.new]] ''<translate>creates a new Timer object</translate>''<br/> | + | [[Special:MyLanguage/Timer.new|Timer.new]] ''<translate>creates a new Timer object</translate>''<br/><!-- GIDEROSMTD:Timer.new --> |
− | [[Special:MyLanguage/Timer.pauseAll|Timer.pauseAll]] ''<translate>pause all timers</translate>''<br/> | + | [[Special:MyLanguage/Timer.pauseAll|Timer.pauseAll]] ''<translate>pause all timers</translate>''<br/><!-- GIDEROSMTD:Timer.pauseAll --> |
− | [[Special:MyLanguage/Timer.resumeAll|Timer.resumeAll]] ''<translate>resume all timers</translate>''<br/> | + | [[Special:MyLanguage/Timer.resumeAll|Timer.resumeAll]] ''<translate>resume all timers</translate>''<br/><!-- GIDEROSMTD:Timer.resumeAll --> |
− | [[Special:MyLanguage/Timer.stopAll|Timer.stopAll]] ''<translate>stop all timers</translate>''<br/> | + | [[Special:MyLanguage/Timer.stopAll|Timer.stopAll]] ''<translate>stop all timers</translate>''<br/><!-- GIDEROSMTD:Timer.stopAll --> |
− | [[Special:MyLanguage/Timer:getCurrentCount|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/><!-- GIDEROSMTD:Timer:getCurrentCount --> |
− | [[Special:MyLanguage/Timer:getDelay|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/><!-- GIDEROSMTD:Timer:getDelay --> |
− | [[Special:MyLanguage/Timer:getRepeatCount|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/><!-- GIDEROSMTD:Timer:getRepeatCount --> |
− | [[Special:MyLanguage/Timer:isRunning|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/><!-- GIDEROSMTD:Timer:isRunning --> |
− | [[Special:MyLanguage/Timer:reset|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/><!-- GIDEROSMTD:Timer:reset --> |
− | [[Special:MyLanguage/Timer:setDelay|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/><!-- GIDEROSMTD:Timer:setDelay --> |
− | [[Special:MyLanguage/Timer:setRepeatCount|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/><!-- GIDEROSMTD:Timer:setRepeatCount --> |
− | [[Special:MyLanguage/Timer:start|Timer:start]] ''<translate>starts the timer</translate>''<br/> | + | [[Special:MyLanguage/Timer:start|Timer:start]] ''<translate>starts the timer</translate>''<br/><!-- GIDEROSMTD:Timer:start --> |
− | [[Special:MyLanguage/Timer:stop|Timer:stop]] ''<translate>stops the timer</translate>''<br/> | + | [[Special:MyLanguage/Timer:stop|Timer:stop]] ''<translate>stops the timer</translate>''<br/><!-- GIDEROSMTD:Timer:stop --> |
| style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| | ||
=== <translate>Events</translate> === | === <translate>Events</translate> === | ||
− | [[Special:MyLanguage/Event.TIMER|Event.TIMER]]<br/> | + | [[Special:MyLanguage/Event.TIMER|Event.TIMER]]<br/><!-- GIDEROSEVT:Event.TIMER --> |
− | [[Special:MyLanguage/Event.TIMER_COMPLETE|Event.TIMER_COMPLETE]]<br/> | + | [[Special:MyLanguage/Event.TIMER_COMPLETE|Event.TIMER_COMPLETE]]<br/><!-- GIDEROSEVT:Event.TIMER_COMPLETE --> |
=== <translate>Constants</translate> === | === <translate>Constants</translate> === | ||
|} | |} |
Revision as of 14:54, 31 August 2018
Supported platforms:
Available since: Gideros 2011.6
Inherits from: Object
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 |