Difference between revisions of "Timer.delayedCall"

From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
+
'''Available since:''' Gideros 2011.6<br/>
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
+
'''Class:''' [[Timer]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/Timer|Timer]]<br/>
+
 
=== <translate>Description</translate> ===
+
=== Description ===
<translate><br />
+
Provides a simple way to call a function after a set amount of time. This function returns the '''Timer''' object created inside.
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>
 
 
<syntaxhighlight lang="lua">
 
<syntaxhighlight lang="lua">
 
(Timer) = Timer.delayedCall(delay,func,data)
 
(Timer) = Timer.delayedCall(delay,func,data)
 
</syntaxhighlight>
 
</syntaxhighlight>
=== <translate>Parameters</translate> ===
+
 
'''delay''': (number) <translate>Delay in miliseconds before the function is called</translate> <br/>
+
=== Parameters ===
'''func''': (function) <translate>Function to call</translate> <br/>
+
'''delay''': (number) delay in miliseconds before the function is called<br/>
'''data''': (any) <translate>An optional data parameter that is passed as a first argument to the function</translate> '''optional'''<br/>
+
'''func''': (function) function to call<br/>
=== <translate>Return values</translate> ===
+
'''data''': (any) an optional data parameter that is passed as a first argument to the function '''optional'''<br/>
'''<translate>Returns</translate>''' (Timer) <translate>The [[Special:MyLanguage/Timer|Timer]] object</translate><br/>
+
 
 +
=== Return values ===
 +
'''Returns''' (Timer) the Timer object<br/>
  
 
{{Timer}}
 
{{Timer}}

Latest revision as of 22:37, 24 August 2024

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