GetTime: Difference between revisions

From VisionaireWiki
Jump to navigation Jump to search
m (Bot (Edward's framework))
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
==getTime==
==getTime==
Returns the number of milli seconds since a specific point in time. Only use this command for relative time measurements. E.g. call this command twice at different locations and calculate the time differential to see the time passed. Never use the absolute time returned from this command on its own because the point in time which defines 0 milli seconds is undefined.
Returns the number of milli seconds since the command was called the first time (or the timer was reset). Use this command for relative time measurements. E.g. call this command twice at different locations and calculate the time differential to see the time passed.  


Lua Syntax:
Lua Syntax:
<pre>getTime()</pre>
<pre>getTime({flags=1, reset = true|false})</pre>
===Arguments===
===Arguments===
===Flags===
===Flags===
====r/reset====
:If true the timer will be reset and the next call(s) will return the time passed since this call.
===Return Values===
===Return Values===
;time
;time
:Milli seconds
:Milli seconds

Latest revision as of 23:17, 17 August 2011

getTime

Returns the number of milli seconds since the command was called the first time (or the timer was reset). Use this command for relative time measurements. E.g. call this command twice at different locations and calculate the time differential to see the time passed.

Lua Syntax:

getTime({flags=1, reset = true|false})

Arguments

Flags

r/reset

If true the timer will be reset and the next call(s) will return the time passed since this call.

Return Values

time
Milli seconds