Difference between revisions of "Timer.delayedCall"

From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''Available since:''' Gideros 2011.6<br/>
+
<languages />
=== Description ===
+
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
<br />
+
'''<translate>Class</translate>:''' [[Special:MyLanguage/Timer|Timer]]<br/>
 +
=== <translate>Description</translate> ===
 +
<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 />
+
<br /></translate>
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
(Timer) = Timer.delayedCall(delay,func,data)
 
(Timer) = Timer.delayedCall(delay,func,data)
</source>
+
</syntaxhighlight>
=== Parameters ===
+
=== <translate>Parameters</translate> ===
'''delay''': (number) Delay in miliseconds before the function is called <br/>
+
'''delay''': (number) <translate>Delay in miliseconds before the function is called</translate> <br/>
'''func''': (function) Function to call <br/>
+
'''func''': (function) <translate>Function to call</translate> <br/>
'''data''': (any) An optional data parameter that is passed as a first argument to the function '''optional'''<br/>
+
'''data''': (any) <translate>An optional data parameter that is passed as a first argument to the function</translate> '''optional'''<br/>
=== Return values ===
+
=== <translate>Return values</translate> ===
'''Returns''' (Timer) The `Timer` object<br/>
+
'''<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