Creates a new timer, does not start until start method is called.
Add a callback for when this Timer reaches end.
This Timer.
Promise that will resolve when Timer reaches end.
Resets the Timer and starts it.
*(WARNING) This method cannot be used in tests as Jest mocks timeout
s based on browser specs. They claim changing the testEnv to node fixes it, but it still doesn't recognize the timeout.refresh()
as a method that exists.
This currently running Timer.
Starts the Timer from the beginning if it's not running, or does nothing if already running.
This currently running Timer.
This currently stopped Timer.
Creates a new timer, does not start until start method is called.
A simple and smart wrapper around NodeJS.Timeout