Clocks
Clocks are another way of defining a function that runs every so often.
clock <name> <time> {
<...>
}
The time
argument is identical to the schedule
command's delay argument. It takes a number, and a unit of time.
Examples
Basic 20 Second Clock
This will run the say Hello, world!
command every 20 seconds.
clock my_clock 20s {
say Hello, world!
}
Basic 1 Tick Clock
This will run the say Hello, world!
command every tick.
clock my_clock 1t {
say Hello, world!
}