Timers

Abel Sanchez and John R. Williams

Basic Timer

Repeating Timer - setTimeout

Repeating Timer - setInterval

SetTimeout I

SetTimeout II

SetInterval I

SetInterval II

SetInterval Only

If execution time exceeds delay time, intervals try to catch up. The interval runs, skipping delay time, as soon as previous interval is finished.

SetInterval III

Event Time Example

Task Time

Timer Comparison

Ball Animation Exercise

THE END