<!-- Page: https://rustic-game-engine.pages.dev/docs/guides/gameplay-actions/timers -->

# Schedule timers

[Back to Use gameplay actions](https://rustic-game-engine.pages.dev/markdown/guides/gameplay-actions.md).

Follow [Set up gameplay actions](https://rustic-game-engine.pages.dev/markdown/guides/gameplay-actions/setup.md) before running this Lua example.

```lua
return { Start = function()
  Timer.after(2, function() print("delayed") end)
  local repeating = Timer.every(0.5, function() print("tick") end, 4)
  repeating.pause()
  repeating.resume()
  -- repeating.cancel() prevents subsequent delivery.
end }
```

`Timer.every(interval, callback, count?)` requires a positive interval/count. Omit
count to repeat until cancelled. Large frame deltas preserve leftover time and may
queue several ticks. Infinite zero-duration action loops fail within a bounded
step budget. Callback execution itself is still subject to the language runtime's
budget/deadline; keep callbacks short.
