So I understand how to create and use timer.performWithDelay(options) but is there a way to cancel this outside of the function that is being called?
I am looking at this tutorial: https://docs.coronalabs.com/api/library/timer/cancel.html and it appears that the only option to cancel a timer is from within the Table Listener Function.
I have an exit button that when pressed, I need to stop the timer. So the only way I can see this working is if I have a boolean variable for the timer function to check every call and to set it to true if the exit button is pressed. Is there a simpler method to do this?
Cheers.