Energy or lives regen by time

Hi I´m trying to make a mobile game for android and IOS, but I don’t know how to make a timer so that even if you are out of the app the time stills running and every certain time you regenerate 1 live or 1 point of energy (like candy crush). I haven´t found anything about it :frowning: please help

Hey @ccampos93 , I know I’m late to the party but I found this thread in case you’re still in need of this info

https://www.reddit.com/r/gamedev/comments/mc37fj/regenerate_lives_based_on_irl_time_in_unity/