A simple class for managing timers in JavaScript