I swear I was able to do this before and it worked... maybe my brain is not working well this morning. Can someone help?
I just want to know how long the app has been in the background so if it has been there for more than a minute I can enforce that it gets data from the server.
Right now I'm trying something like this:
discard = GetResumed()
do
if GetResumed() = 1
if GetMilliseconds() - lastTime > 60000
//do some stuff
endif
endif
lastTime = GetMilliseconds()
Sync()
loop
It seems that this always gets the lastTime before GetResumed()... I guess that is sort of to be expected as it needs to complete the loop, but I just can't see how to do it right.
Thanks!