Discuss Scratch

AgAgga
Scratcher
78 posts

timer

how do you stop the timer
InternetUser_005
Scratcher
100+ posts

timer

AgAgga wrote:

how do you stop the timer

You can't actually stop the timer. It starts running when your project starts and keeps going.

What you do in place of stopping the timer is set a variable to the value of the timer then subtract to get the difference between what you saved in the variable and the current value of timer. This will give you the amount of time that has passed. You can also reset the timer in your program so it starts timing when you want it to.

Hope this makes sense. If you need more help please explain what you are trying to do with more detail.

IU5
MegaApuTurkUltra
Scratcher
1000+ posts

timer

You cannot stop the timer. However, you can reset the timer back to 0 using
resettimer

If you want to pause the timer and restart it where it was paused, you can try the following scripts (they save the value the timer was at when you pause, and then add it to the current timer value when you want to retrieve the value of the timer)
defineResetTimerTo0settimer onto1settimer offsetto0resettimerdefineStartTimeriftimeron=0resettimersettimer onto1definePauseTimeriftimeron=1changetimer offsetbytimersettimer onto0defineGetValueOfTimeriftimeron=0setthe value of the timertotimeroffsetelsesetthe value of the timertotimeroffset+timer
Baconstunt
Scratcher
1 post

timer

Powered by DjangoBB