Difference between revisions of "Timer.delayedCall"
From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2011.6<br/> === Description === <br /> Provides a simple way to call a function after a set amount of time. This function returns the<...") |
|||
Line 7: | Line 7: | ||
<br /> | <br /> | ||
<source lang="lua"> | <source lang="lua"> | ||
− | (Timer) | + | (Timer) = Timer.delayedCall(delay,func,data) |
</source> | </source> | ||
− | '''delay | + | '''delay''': (number) Delay in miliseconds before the function is called ''''''<br/> |
− | '''func | + | '''func''': (function) Function to call ''''''<br/> |
− | '''data | + | '''data''': (any) An optional data parameter that is passed as a first argument to the function '''optional'''<br/> |
'''Returns''' (Timer) The `Timer` object<br/> | '''Returns''' (Timer) The `Timer` object<br/> |
Revision as of 10:21, 23 August 2018
Available since: Gideros 2011.6
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)
'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
Returns (Timer) The `Timer` object