Executes a given function repeatedly at a specified interval using setTimeout and clearTimeout.
The function to be executed.
The interval (in milliseconds) at which the function should be executed.
A function that, when called, clears the interval and stops the execution of the given function.
Executes a given function repeatedly at a specified interval using setTimeout and clearTimeout.