Using the Timer
-
Prerequisite
Description
In the sensing category, there is a reporter block for “timer”, and 3 stack blocks for working with timers: “Reset Timer”, “Pause Timer” and “Resume Timer”.
https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/d32095c8-6996-4e76-9d87-8e202edc01a4.PNG" width="550" style="">
The “Timer” Block
The “timer” block tells us how much time, in “seconds”, has passed since the timer was reset. Note that when you click the green flag button, the timer is reset to 0 as well.
This block shows the value of time on stage when you check the checkbox to its left.
Note: The value of time is shown in seconds (as opposed to minutes), even if it is more than 60 seconds.
For example,
means the timer value is 91 seconds and 378 milliseconds.
https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/120d7373-50f0-45d9-a9d7-2ca904ac0f73.gif" width="900" style="border-radius: 5px; border: 1px solid #29622d;">
The “Reset Timer” Block
This block resets the timer value to zero. That is, whenever you click the “reset timer” block, the timer starts counting from zero again.
https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/5bb0cb86-5aea-4e75-9e59-1ca04efa27af.gif" width="900" style="border-radius: 5px; border: 1px solid #29622d;">
“Pause Timer” and “Resume Timer”
The “pause timer” block freezes the timer to its current value, so the timer value will not go up anymore.
The “resume timer” block resumes the timer, so that it will continue to count time from its current value.
https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/c2e885ab-8ada-44f2-8d07-47f1a8f08529.gif" width="900" style="border-radius: 5px; border: 1px solid #29622d;">
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login