Skip to main content

Function: getElapsedTime()

getElapsedTime(): number

Defined in: system/gametime.ts:19

Gets the game time since the game started, from a periodic Timer the library starts at the gameStart stage.

Returns​

number

The elapsed game time, in seconds; 0 before the gameStart stage.

Remarks​

The Timer is created after MarkGameStarted, where w3ts created it at the end of main. Timers do not tick during initialization, so the value is the same on a running game.