Triggers the callback function associated with the timer.
This method can be called manually to simulate the timer invocation.
Returns void
start
start(): void
Starts the timer.
If the timer is already started, it will be stopped
first and then restarted.
Returns void
stop
stop(): void
Stops the timer if it is currently running.
If the timer is a repeating timer, it will be stopped
using clearInterval.
If the timer is a non-repeating timer, it will be
stopped using clearTimeout.
Represents a timer that can be started, stopped, and repeated at a specified rate.