I currently have a problem with the "timer" block.
After I "reset timer" the timer function returns the time elapsed since that time. If I pause the project, the timer does not pause, it continues to advance ... (if I reset the timer and after 10 seconds, I pause the program for 10 seconds, if i unpause the program after this 10 second of pause it return 20 seconds: the timer didn't pause...)
Is there a way to tell me if the program is paused, stopped, or is currently running and can this function be executed even though the program is paused?
So I could subtract the "time paused" or the "time stpooed" from the timer to reflect the real time that has elapsed since the timer start ...
There have been bunches of projects, dating back to the early BYOB days, to enable pausable timers in Snap! code. Basically you remember the time of the most recent resume from a pause, and you remember the amount of time that had accumulated before the most recent pause, and from that you can compute the timer's current value. (And of course you remember a Boolean timer-paused flag.)
You can use lambda-based object generation to allow multiple timers, each individually pausable, if you want.