Difference between revisions of "Timer.delayedCall"
From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>") |
|||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
+ | <languages /> | ||
'''<translate>Available since</translate>:''' Gideros 2011.6<br/> | '''<translate>Available since</translate>:''' Gideros 2011.6<br/> | ||
'''<translate>Class</translate>:''' [[Special:MyLanguage/Timer|Timer]]<br/> | '''<translate>Class</translate>:''' [[Special:MyLanguage/Timer|Timer]]<br/> | ||
Line 5: | Line 6: | ||
<translate><br /> | <translate><br /> | ||
Provides a simple way to call a function after a set amount of time. This function returns the<br /> | Provides a simple way to call a function after a set amount of time. This function returns the<br /> | ||
− | + | [[Special:MyLanguage/Timer|Timer]] object created inside.<br /> | |
<br /></translate> | <br /></translate> | ||
− | < | + | <syntaxhighlight lang="lua"> |
(Timer) = Timer.delayedCall(delay,func,data) | (Timer) = Timer.delayedCall(delay,func,data) | ||
− | </ | + | </syntaxhighlight> |
=== <translate>Parameters</translate> === | === <translate>Parameters</translate> === | ||
'''delay''': (number) <translate>Delay in miliseconds before the function is called</translate> <br/> | '''delay''': (number) <translate>Delay in miliseconds before the function is called</translate> <br/> | ||
Line 15: | Line 16: | ||
'''data''': (any) <translate>An optional data parameter that is passed as a first argument to the function</translate> '''optional'''<br/> | '''data''': (any) <translate>An optional data parameter that is passed as a first argument to the function</translate> '''optional'''<br/> | ||
=== <translate>Return values</translate> === | === <translate>Return values</translate> === | ||
− | '''<translate>Returns</translate>''' (Timer) <translate>The | + | '''<translate>Returns</translate>''' (Timer) <translate>The [[Special:MyLanguage/Timer|Timer]] object</translate><br/> |
+ | |||
+ | {{Timer}} |
Latest revision as of 15:33, 13 July 2023
Available since: Gideros 2011.6
Class: Timer
Description
Provides a simple way to call a function after a set amount of time. This function returns the
Timer object created inside.
(Timer) = Timer.delayedCall(delay,func,data)
Parameters
delay: (number) Delay in miliseconds before the function is called
func: (function) Function to call
data: (any) An optional data parameter that is passed as a first argument to the function optional
Return values
Returns (Timer) The Timer object