Game dev
Saved & recent

Timer

Related terms: timeout, interval, deadline, scaled time, coroutine

Tracks when a duration has elapsed and triggers an action. A one-shot timer fires once; a repeating timer fires at an interval. Timers drive cooldowns, delayed explosions and enemy spawns.

A frame-based timer usually checks elapsed delta time or compares the current clock with a deadline. It fires on a later update, so timing is limited by update frequency. Choose whether pausing or slow motion should affect its clock.

Further reading
Godot: Timer
one-shot timer 0.0 0.4 0.8 1.2 1.6 2.0 2.4 repeating timer 0.0 0.4 0.8 1.2 1.6 2.0 2.4 deadline fires at update elapsed time (s)
The example checks the clock every 0.4 s. A 0.7 s deadline first fires at 0.8 s. The repeating timer uses deadlines based on its original start time.

View in the full Game dev collection