Skip to main content

Module time

Module time 

Source
Expand description

Everything about time: frame timing, game-time scheduling and simple timers.

There are two kinds of time in the engine:

Structsยง

Cooldown
Limits how often something can happen, e.g. firing a weapon.
Interval
Fires at a fixed real-time rate. Great for footsteps, radar beeps or clocks.
Time
Frame timing and a simple named-event scheduler. Available as ctx.time.
Timer
A stopwatch measuring real time. Can be paused, resumed and restarted.