Yes, you need to keep the task open for the timer to continue to run. You would want it to keep running in the background? It seems like it would be easy to forget about if it's implemented that way...
A year back I had started building a web based time tracker using HTML5 background workers and stuff. But I lost motivation. :(