Pausing a timer

0 votes
Is it possible to pause and restart a timer? In my situation it's not a game timer, it's a utility app where a user is completing a task in a certain amount of time. They need to be able to pause the timer, leave, and then come back and restart the timer where it left off.
asked Jun 14, 2016 in Corona by brian (15 points)

1 Answer

0 votes
Hi Brian,

Could you please provide some more information that which timer you want to pause? It will help us to provide better support from our side.

Thanks.
answered Jun 15, 2016 by rajeev.etc (1,660 points)
I'm talking about just the regular timers created under Gaming > Timers.   The API allows me to create a timer, start a timer, cancel a timer and delete a timer, but I cannot pause and restart a timer (which would have the effect of extending the timer's End Time by however long the timer was paused).

So for example, if I created a new timer at 10am set for 20 minutes I'd get an end time of 10:30am.  I'd like to be able to "pause" the timer at some point prior to the end time, then "restart" the same timer at a later time.  If I restarted that timer after 30 minutes had passed. The API should return a new end time of 11:00am... the original end time plus the amount of time elapsed while it was paused.
Hi Brian,

As of now pause is not available in the Timer Service. Could you please explain the use-case of pausing the timer in your app? It will help us to understand the requirement in better way and i can help you in better way.

Thanks.
In my case I am managing multiple 20 minute countdown timers for kids who are reading books.  But if the child has to stop and eat lunch in the middle of their 20 minute reading session, they need to be able to pause the timer while they eat and restart it when they come back to read again.

I suppose I could manage the pausing via storage service, where if they "pause" the timer I could save the time remaining in their user record. And when they restart the timer I would create a new timer with the time remaining.

I just thought having a pause and resume function built into the timer service would be a good addition to suggest.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...