Built-In Time Sources

Time Source Constant
ConstantDescriptionValue
time_source_globalThe Global Time Source0
time_source_gameThe Game Time Source1

You can use the Global Time Source or the Game Time Source as a parent for your custom Time Source. Both Time Sources are globally available.

The Global Time Source runs outside the main game loop, while the Game Time Source runs as part of the game loop.

The choice between Global/Game doesn't affect whether Time Sources are affected by your game's framerate; that will depend on the unit you use.

Order

Time Sources inheriting from the Global Time Source are processed before the Game Time Source.

NOTE See Event Order for more details.

States

The Game Time Source has states, meaning it can be paused. The Global Time Source doesn't have states and can't be paused.

You can use the Global Time Source for timers that should run regardless of the game state, and the Game Time Source for timers that are tied to your main game loop. You can then pause all of your game-related timers by pausing the Game Time Source.