How can I repeat a function doSomething() every 5 seconds.
doSomething()
I also need code that will make it stop doing it.
And code to on-the-fly adjust the f
You could use setTimeout() for this.
http://www.w3schools.com/htmldom/met_win_settimeout.asp