Difference between revisions of "Time Module"

From SolarStrike wiki
Jump to: navigation, search
m (Elverion moved page Timer Module to Time Module without leaving a redirect)
m
Line 1: Line 1:
 
== getNow() ==
 
== getNow() ==
'''int64 timer.getNow()'''
+
'''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 timer.deltaTime()'''
+
'''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 timer.diff(int64 t2, int64 t1)'''
+
'''number time.diff(int64 t2, int64 t1)'''
  
Compares two high-precision time values (from timer.getNow()) and returns the amount of time that has elapsed between them in seconds.
+
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.