scratchfoundation / scratch-gui

Graphical User Interface for creating and running Scratch 3.0 projects.
https://scratchfoundation.github.io/scratch-gui/develop/
BSD 3-Clause "New" or "Revised" License
4.46k stars 3.55k forks source link

Timer goes from 0 to 0.01 and back again if reset timer is in forever loop #659

Open CosmicWebServices opened 7 years ago

CosmicWebServices commented 7 years ago

Expected Behavior

In Scratch 2 if you put a reset timer in a forever loop the timer stays in 0. See https://scratch.mit.edu/projects/172704222/

Actual Behavior

Timer goes from 0 to 0.01 and back again multiple times.

Steps to Reproduce

  1. Put reset timer in a forever loop.
  2. Start project.
  3. Observe

Operating System and Browser

Firefox and Mac OS

rschamp commented 7 years ago

Nice catch, thanks for the report @CosmicWebServices!

mrjacobbloom commented 7 years ago

Potentially relevant: in https://github.com/LLK/scratch-vm/issues/268 people showed interest in more precision in the days since 2000 block, the preference may be similar in the timer as well

CosmicWebServices commented 7 years ago

@mrjacobbloom It is the same as Scratch 2... I don't think we would want to mess with the values

AmazingMech2418 commented 6 years ago

That is because of script execution lag. Maybe if parallel computing was used, this wouldn't be a problem.