calculating the passed time even when the game is clossed and send notifications

hi
would anybody help me for counting the time ,even when the app is closed
for example in pou after exitting from app there are some messages that says pou is hungry or sleepy…
how the system knows that how much time is passed from pou last eating , when the app is closed
should i use from the network time function and doesn’t it reduce the performance ?
thanks and more…

The game doesn’t do it itself. iOS has a notification system where you tell the phone’s operating system to give the user a notification after a certain time has passed

iOS notifications

EDIT:

On Android there doesn’t seem to be a handy way to do it straight from C# / UnityScript. You need to call native Java code from your Unity app. The logic is the same though: tell the OS to alert the user at a certain time (system time)

Android notification call