Difference between revisions of "Timer.delayedCall"

From GiderosMobile
Line 5: Line 5:
 
<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 />
`Timer` object created inside.<br />
+
[[Special:MyLanguage/Timer|Timer]] object created inside.<br />
 
<br /></translate>
 
<br /></translate>
 
<source lang="lua">
 
<source lang="lua">
Line 15: Line 15:
 
'''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 `Timer` object</translate><br/>
+
'''<translate>Returns</translate>''' (Timer) <translate>The [[Special:MyLanguage/Timer|Timer]] object</translate><br/>

Revision as of 09:37, 24 August 2018

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