Closed daver182 closed 10 years ago
Hi Daver. There is no pause method as such, but it can be done.
For timers (countdown = false), it's simple:
if (tock.go) {
tock.stop();
} else {
tock.start();
}
For countdown timers it is a bit more complicated as start() requires a parameter. So you would have to do something like:
if (tock.go) {
tock.pause_time = tock.lap();
tock.stop();
} else {
tock.start(tock.pause_time);
}
I should probably just add a pause() method...
Hi, thanks for the answer but I have once concern, the solution will remember the last value?, I mean it will start in the point where stops?
I've made a small change to the second piece of code above. It will remember the time, yes.
Thanks again, I feel a little dumb but, can this work for not a countdown?
Pull the latest changes and you can just use pause().
I looking for the option to pause the timer, it's posible?