Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Time to process a script
- AndrewBerezaafan
-
Scratcher
100+ posts
Time to process a script
Does anyone know how long it takes for Scratch to do 1 Script?
e.g.
e.g.
when green flag clickedHow long will it take scratch to do
change [time v] by (1)
change [time v] by (1)
- lil_David
-
Scratcher
55 posts
Time to process a script
Not very long.
According to a test I did just now based on changing the variable constantly, I came up with 6 053 446 times in 10 seconds for my late 2015 iMac, or about 605 345 times a second, so about 0.00000165 seconds.
According to a test I did just now based on changing the variable constantly, I came up with 6 053 446 times in 10 seconds for my late 2015 iMac, or about 605 345 times a second, so about 0.00000165 seconds.
Last edited by lil_David (Aug. 19, 2016 01:21:55)
- footsocktoe
-
Scratcher
1000+ posts
Time to process a script
Does anyone know how long it takes for Scratch to do 1 Script?
e.g.when green flag clickedHow long will it take scratch to do
change [time v] by (1)change [time v] by (1)
Scratch is set to perform loops at 30 times a second if they have anything to do with the screen.
Otherwise, it's speed is as fast as your computer will let it be.
- AndrewBerezaafan
-
Scratcher
100+ posts
Time to process a script
What I mean guys is that if i went
So if i went
How fast will it run
So if i went
when green flag clickedThat wait 1 second isn't going to be precise if I wanted it to change the time by 1 every second, it would actually wait like 1.03 seconds, so I would have to change the wait block to
forever
change [Time v] by (1)
wait (1) secs
end
wait (0.97) secs
How fast will it run
change [Time v] by (0)
- footsocktoe
-
Scratcher
1000+ posts
Time to process a script
What I mean guys is that if i went
So if i wentwhen green flag clickedThat wait 1 second isn't going to be precise if I wanted it to change the time by 1 every second, it would actually wait like 1.03 seconds, so I would have to change the wait block to
forever
change [Time v] by (1)
wait (1) secs
endwait (0.97) secs
How fast will it runchange [Time v] by (0)
You will have to determine it by experiment. It will be different for every computer.
Run the loop a 100 times and compare it to the timer.
- AndrewBerezaafan
-
Scratcher
100+ posts
Time to process a script
Thanks for replying, how do you create a signature?
- footsocktoe
-
Scratcher
1000+ posts
Time to process a script
Thanks for replying, how do you create a signature?
Just like the method you used to create yours.

- FlubbaFish
-
Scratcher
62 posts
Time to process a script
Ok, here is how to create a signature.
You need to go to the very bottom of the discuss page, just look around and you will find the link that says
Change your Signature.
P.S Do you like mine?
Thank you please reply from FlubbaFish.
You need to go to the very bottom of the discuss page, just look around and you will find the link that says
Change your Signature.
P.S Do you like mine?
Thank you please reply from FlubbaFish.
- Discussion Forums
- » Help with Scripts
-
» Time to process a script