Difference between revisions of "Time Module"
From SolarStrike wiki
m (Elverion moved page Timer Module to Time Module without leaving a redirect) |
m |
||
Line 1: | Line 1: | ||
== getNow() == | == getNow() == | ||
− | '''int64 | + | '''int64 time.getNow()''' |
Returns the current high-precision time as an int64 table. | Returns the current high-precision time as an int64 table. | ||
Line 6: | Line 6: | ||
== deltaTime() == | == deltaTime() == | ||
− | '''number | + | '''number time.deltaTime()''' |
Returns the deltaTime for the current logic cycle | Returns the deltaTime for the current logic cycle | ||
Line 12: | Line 12: | ||
== diff() == | == diff() == | ||
− | '''number | + | '''number time.diff(int64 t2, int64 t1)''' |
− | Compares two high-precision time values (from | + | Compares two high-precision time values (from time.getNow()) and returns the amount of time that has elapsed between them in seconds. |
Revision as of 19:23, 8 August 2014
getNow()
int64 time.getNow()
Returns the current high-precision time as an int64 table.
deltaTime()
number time.deltaTime()
Returns the deltaTime for the current logic cycle
diff()
number time.diff(int64 t2, int64 t1)
Compares two high-precision time values (from time.getNow()) and returns the amount of time that has elapsed between them in seconds.