I need a function which continuously runs in the background.
it must have the following characteristics.
1) Does not interfere with other code which runs procedurally when the page loads or in response to specific events.
2) Can be started and stopped at any time.
3) Can be paused at any time (and of course started again where it left off)
how can i do this