How to pause performWithDelay?

I have some things that will happen a second after the user hits the trigger, so the obvious approach is using performWithDelay, documented here:
http://developer.anscamobile.com/content/timer-library

However, how would you pause the delay timer? As in, if the user hits the trigger and then pauses the game. [import]uid: 12108 topic_id: 4792 reply_id: 304792[/import]

Incidentally I haven’t taken a look at this other code yet, am planning to:
http://developer.anscamobile.com/forum/2010/12/14/beebegames-class-download

I figure maybe the same technique he uses to pause transitions I can use to pause the delay timer, I’ll see. [import]uid: 12108 topic_id: 4792 reply_id: 15365[/import]

It seems he doesn’t use Corona’s built-in transitions because you can’t pause the built-in transitions.

I tried checking to see if the delay timer has undocumented features for returning the time remaining when you cancel a timer (so that you can later resume from that time) but no such luck.

Does anyone know how to pause a delay timer? Because if not, then delay timers are actually pretty useless; they seem useful at first, but if you can’t pause them then you can’t use them for any production purposes.

I suppose I can work around this limitation by using enterFrame listeners and check the current time every frame, but it sure seems silly for Corona to have special pause timers that you can’t actually use.

ADDITION: I eventually found the command system.getTimer() and that allows a pretty simple method of tracking the time elapsed for a delay timer. I’m still wondering though if there is a better way to do this because it still feels like this little trick is doing redundant work.

Anyway, when you create a delay timer you can attach the current time to it like so:

t = timer.performWithDelay(10000, test)  
t.start = system.getTimer()  

Then when you cancel the timer you can check the time elapsed like so:

print(system.getTimer() - t.start)  

The returned time seems to be off by about 30 milliseconds which is about the time between frames, so for most purposes that’s fine.

This trick can be used (or rather a modification of this, to check time remaining rather than time elapsed) to cancel timers when the player hits Pause, and then later create new timers using the time remaining. [import]uid: 12108 topic_id: 4792 reply_id: 15932[/import]