09.03.2013, 18:39
You don't even need all those variables and timers. The only thing you need is one (1) field in your table. Save the registration timestamp in there by means of the UNIX_TIMESTAMP() functionality. This is a value that measures the seconds elapsed since the epoch on 1/1/1970.
Whenever you want to retrieve the time played, subtract the saved timestamp from the current timestamp. This will give you a value in seconds. Use an algorithm to convert it to minutes and hours.
Whenever you want to retrieve the time played, subtract the saved timestamp from the current timestamp. This will give you a value in seconds. Use an algorithm to convert it to minutes and hours.