I’d think many of you played the game Candy Crush, which gives you a maximum of five lives and takes away one every time you fail to solve the puzzle. Of the several ways you can replenish your lives, one option is to just wait for “x” number of minutes and the game gives you a life each time that wait time is up. That behavior is basically what I’m trying to adapt in my game.

How would I go about keeping track of the time between the moment when the user used up his/her lives and when the time requirement (in minutes) is satisfied? And, of course, this timer should still be running in the background even when the player completely closed the game (i.e., no persisting session in the device’s background).

Well, there are many ways you can approach that problem.

A simple implementation would be to keep track of the exact time that player lost a life (store it in local db or playerprefs), and, whenever you’re going to render the lives you check for that value and calculate if the specified time to fill another life has passed.
If so, you’ll change the store entry to the new time that it happened.

If you’ve stayed out of the game, you can calculate how many lives you should increase once you’re back to the game, doing the same procedure.