Keeping a game running?

I am new to Corona and have started working on an idea. I am creating a simple game kind of like an old nano pet or tomagachi pet where you have to take care of an animal. I was wondering how to / if its possible, to get the game so that when after you take the 3 minutes or whatever to take care of the animal and the game was shut off by the user, to do other things on his / her phone that it kept running or track of time. That way in a few hours or what ever time I want to set it comes with a notification saying something like " Hey, your animal needs to be fed again".

If this section is posted somewhere else I am sorry as I could not find it. Also any help would be great. Thanks. [import]uid: 152328 topic_id: 27424 reply_id: 327424[/import]

You could use something like os.date() to find out what the real time is and save that time when the app suspends. Then when the app launches/resumes, use os.date() again to figure out how much time has passed.

[import]uid: 7563 topic_id: 27424 reply_id: 111423[/import]