Tag Archive for 'running'

20
Feb

Creating timers using the Timer class

In previous examples, we saw how to use the setInterval() and setTimeout() methods to create simple timers.

The following example shows how you can execute code at regular intervals using the Timer class. It also shows you how you can create timers that repeat continuously as well as timers which only execute a specific number of times.

Full code after the jump.

Continue reading ‘Creating timers using the Timer class’