e2 docs timer - wiremod/wire GitHub Wiki
Timer
Rv1)
interval(Sets a one-time timer with name "interval" and delay in milliseconds (minimum delay for timers is 10ms) (20 ops)
Rv1,
Rv2)
timer(Sets a one-time timer with entered name and delay in milliseconds (20 ops)
Rv1)
stoptimer(Stops a timer, can stop interval with stoptimer("interval") (5 ops)
= clk()
Returns 1 if the current execution was caused by the interval (1 ops)
= clk(
Rv1)
Returns 1 if the current execution was caused by the inserted name (1 ops)
= clkName()
Returns the name of the timer that caused current execution (1 ops)
= getTimers()
Returns an array of all timers used in the E2 (1 ops)
stopAllTimers()
Stops all timers (1 ops)
= curtime()
Returns the current game time since server-start in seconds (1 ops)
= realtime()
Returns the current real time since server-start in seconds (1 ops)
= systime()
Returns a highly accurate time (also in seconds) since the server was started. Ideal for benchmarking (1 ops)
= date()
Returns the server's current time and date (10 ops)
= date(
Time)
Returns the specified unix time (10 ops)
= dateUTC()
Returns the server's current time and date in UTC (10 ops)
= dateUTC(
Time)
Returns the specified unix time in UTC (10 ops)
= time(
Component)
Returns numerical time/date info from the server. Possible arguments: "year", "month", "day", "hour", "min", "sec", "wday" (weekday, Sunday is 1), "yday" (day of the year), and "isdst" (daylight saving flag 0/1) (10 ops)
= time()
Returns the time in seconds (2 ops)
= time(
Data)
Attempts to construct the time from the data in the given table (same as lua's os.time). The table structure must be the same as in the date() functions. If any values are missing or of the wrong type, that value is ignored (it will be nil) (2 ops)