# Timer run code on a delay or at a repeating interval. ```{raw} html ▶ Run in browser ``` **Tags:** `2d` `timer` `signals` A `Timer` is a node that emits a `timeout` signal after its `duration`. Set `one_shot=False` to repeat. Here a repeating timer spawns a pulse every 0.8s, and each pulse uses its own one-shot timer to remove itself after one second, so the screen stays lively without any per-frame bookkeeping in the root. ## What it demonstrates - `Timer(duration=, one_shot=, autostart=)` -- a node that fires `timeout` after a delay. - `timer.timeout.connect(fn)` -- run something when it fires (a signal, like any other). - Repeating timers (`one_shot=False`) for intervals; one-shot timers for delayed actions. ## Source ```{literalinclude} ../../examples/features/2d/timer.py :language: python :linenos: ```