## Chapter 11. Timers

Timers allow you to execute commands repeatedly at fixed intervals, and also to specify a command to be executed later.

Timers have to mandatory attributes: an `interval` in seconds, that represents how often the timer is fired, and an `action`, that is the command that is executed. Just like in other places, the action can be a text that is sent to the MUD, or it can be something run with Perl.

It is possible to define timers that execute only a fixed number of times. This is the timer's `repeat count`. Whenever the timer is executed, this count is decreased, and when it reaches zero, the timer is disabled, and will only execute again if reenabled manually. A timer can also be temporary: in this case, when the repeat count reaches zero, it is deleted and not only disabled. A repeat count of -1 means that the timer is executed indefinitely.

A timer with a repeat count of one is executed only once. Since the first execution only happens `interval` seconds after it is defined, this allows you to define a command to be executed after some specified time. If it is marked as temporary, the timer will be deleted after it is run this one time.