Timers can be created using methods of the
TimerService interface. This interface supports methods for creating timers which generate events at a specific time, after an elapsed time, after a specific interval, or according to a schedule. This approach provides the client with the ability to initiate a timer.
There are two basic steps needed to create a programmatic timer:
TimerServiceinstance to create the timer, and
As we will see, there are several
TimerService interface methods available to create a timer. Most of these will be explored in the There's more section of this recipe. Initially, we will use the