I’ve been trying to implement a cooldown timer which could persist between application uses.
I can get the time of an event, and store that in a JSON file so that it can be retrieved the next time the app is used. However I am not sure how I would actually compare the 2 times. I thought the easiest way would be to get the time as a unix timestamp and then calculate the number of days/hours/mins etc, but I cannot see a way to get the time in seconds for both iOS and Android.
To give an idea of why I need this, the app will have options that the user can only select once an hour, once a day etc. The different options will have different cooldown times, and obviously the “cooldown end time” will be dynamic so I don’t think I can use something with a predetermined datetime such as http://techority.com/2011/12/07/making-a-countdown-app-with-corona-sdk/
I suspect there is an easy solution, but I’ve been staring at this for a while now and my brain is starting to melt, I’m sure you all know the feeling 
I’d appreciate any help that anyone can give, thanks. [import]uid: 84115 topic_id: 25459 reply_id: 325459[/import]
[import]uid: 84115 topic_id: 25459 reply_id: 103063[/import]