Difference between revisions of "Time Module"

From SolarStrike wiki
Jump to: navigation, search
m
m
Line 1: Line 1:
 
== getNow() ==
 
== getNow() ==
'''int64 time.getNow()'''
+
'''number time.getNow()'''
  
Returns the current high-precision time as an int64 table.
+
Returns the current high-precision time as an int64.
  
  
Line 8: Line 8:
 
'''number time.deltaTime()'''
 
'''number time.deltaTime()'''
  
Returns the deltaTime for the current logic cycle
+
Returns the deltaTime (amount of time in seconds [including fractions] since last cycle) for the current logic cycle
  
  
 
== diff() ==
 
== diff() ==
'''number time.diff(int64 t2, int64 t1)'''
+
'''number time.diff(number t2, number t1)'''
  
 
Compares two high-precision time values (from time.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 23:39, 21 January 2015

getNow()

number time.getNow()

Returns the current high-precision time as an int64.


deltaTime()

number time.deltaTime()

Returns the deltaTime (amount of time in seconds [including fractions] since last cycle) for the current logic cycle


diff()

number time.diff(number t2, number t1)

Compares two high-precision time values (from time.getNow()) and returns the amount of time that has elapsed between them in seconds.