without looking at the demo code:
When game becomes paused - save/capture the current elapsed time.
When game is unpaused - reset all the game time counters to the current system time, then add the time that you captured previously back to the new elapsed time.
Make sense?
When game becomes paused - save/capture the current elapsed time.
When game is unpaused - reset all the game time counters to the current system time, then add the time that you captured previously back to the new elapsed time.
Make sense?