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.delayedCall(delayfuncdata,)
+
(Timer) = Timer.delayedCall(delay,func,data)
 
</source>
 
</source>
'''delay:''' (number) Delay in miliseconds before the function is called ''''''<br/>
+
'''delay''': (number) Delay in miliseconds before the function is called ''''''<br/>
'''func:''' (function) Function to call ''''''<br/>
+
'''func''': (function) Function to call ''''''<br/>
'''data:''' (any) An optional data parameter that is passed as a first argument to the function '''optional'''<br/>
+
'''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 11: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