Time
The simulation time, in seconds, since the game or this save was started. Returns now
when used as a function or TimeDelta
when number is provided.
Types:
warp
: TimeWarp - Time warping utilitiesstamp
: TimeStamp - Absolute time (and date). (LikeDateTime
)delta
: TimeDelta - Relative time. (LikeTimeSpan
)span
: TimeDelta - Relative time. (LikeTimeSpan
)
Static Properties:
now
: TimeStamp - The simulation time, since the game or this save was started. Suitable for measuring time and printing.never
: TimeStamp - Infinitely in the past (-inf
). Useful for initialization of time-stamp variables.none
: TimeStamp - No time (containsNaN
). Note thattime.since(none) = inf
butnow - none
is stillnone
.seconds
: double - The simulation time in seconds, since the game or this save was started. For pure computation (same asnow.seconds
ornow.s
).tick
: TimeDelta - Time delta/span of one tick. (Script engine always runs in physics ticks.)real
: double - Real time since startup in seconds. (Good for printing reports e.g. every second.)
Static Methods:
since()
: TimeDelta, time Object- Time delta/span since some previous time (
TimeStamp
ordouble
). Returnsinfinite
iftime
isnone
. (Use.s
or.seconds
on the result if you want puredouble
value).
- Time delta/span since some previous time (
sinceReal()
: double, real double- Real time since previous point. Returns infinity if input is
nan
.
- Real time since previous point. Returns infinity if input is