The idea is simple enough. Run the counter back end and display the result live on front end. Any ideas on how this can be done?
Basicly, this will look like this :
long startTime = storeTimeFor(User); return (currentTimeInSec - startTimeInSec) * incrementationPerSec
With this, you only need to store the startTime for each user (in database, file, or in cache if you want). On reset, just store the currentTime again.
This is how you would do a timer in lots of langage because incrementing a value every seconds (using a sleep(1000)) would not be precise since your thread will not be running all the time, your are not alone on the machine ;)