I try to keep 'a sense of time' (with milliseconds accuracy, or even ticks if possible) in my app, so I use the stopwatch class.
My question is, how can i keep it running if the user closes the app and return to it the next day?
Now, say the answer is somehow stamping the date time when user closes app and calculate the difference when he opens it
back again, so in a situation where the user has manually changed his device clock to 5 hours forward (for any reason), so when he opens the app again, the calculation will give back false answer of extra 5 hours right? thus breaking the real 'sense of time'.
Is there anyway to achieve this? maybe run the stopwatch in the background somehow?
Thank you for your help.