Performs an operation at the specified time.
Performs an operation after the specified delay.
Run f
every elapsed period
, starting period
from now.
Run f
every elapsed period
, starting period
from now.
Run f
at time when
; subsequently run f
at every elapsed period
.
Run f
at time when
; subsequently run f
at every elapsed period
.
If when
is negative or undefined, it will be treated as Time.epoch.
If period
is negative or undefined, the timer task will be rescheduled
immediately (i.e., period
will be treated as Duration.Zero).
Run f
at time when
.
Run f
at time when
.
If when
is negative or undefined, it will be treated as Time.epoch.
Pay attention that ticking frozen time forward more than 1x duration will result in only one invocation of your task.
Stop the timer.
Exceedingly useful for writing well-behaved tests that need control over a Timer. This is due to it playing well with the Time manipulation methods such as Time.withTimeAt, Time.withCurrentTimeFrozen, and so on.
See the cookbook for examples.