Get the system time - https://www.scirra.com/tutorials/940/ho ... -a-project
Convert to base units of seconds.
Record via variable/localstorage/ect.
Compare with last recorded system time on resume to calculate how much time has passed.
This system is cheatable by modifying the system time. Otherwise, you will need a server side time check. Or, figure out how to request the current date/time from a timeserver.