Code stops running when a game is paused/minimised which can be a problem for timers and other systems that need to continue running.
Here's a simple way to keep your timer running while the game is paused.
0:00 - Creating the timer
4:25 - Preventing the timer being paused