You can't have events running when the game is off of the screen. You could use this plugin to record the time when the game loses focus (event Browser:On suspended). Then when the player returns to the screen (event Browser:On resumed), just compare the time you recorded to the current time to get the amount of time that has passed.