Is there a way to calculate elapsed Time in total? (Even when the App is closed etc.)
Hi! I want to create a game that would use real time for different things (like an hunger bar that decrease more and more, new items everyday etc...).
How could I do that?
I have some ideas like saving the time when the application was started for the first time, then saving the time the application is closed, then calculating elapsed time when the application is opened again, but I don't know how I could do that.
Any ideas? :)
Answer by conman79 · Oct 19, 2016 at 10:42 PM
You could use System.DateTime.Now, but that would be dependent on the system/device so people could change their system/time settings to "cheat". This would probably be fine for most applications, but if you needed a cheat-proof solution you'd need to access a date/time from a remote server.