[Solved] Timer Problem and Lagging

Hey Guys,

I’m having trouble with a Timer. So my app is that you need to answer a math question withing a certain amount of time and my timer is having some difficulties. Here is my code:


The problem is that when I say for the code to wait one second what happens is that sometimes it goes down by two. Although I tell it to restart when it reaches the second zero the timer sometimes goes negative but then restarts. I don’t know I think it’s lagging.

Hi,

first of all, please change your topic to the category #thunkable-cross since it is not about the old classic platform.

I think the problem might be the “forever” block because this will continue to be executed even after your countdown stopped. You might want to try something like “Repeat while” with a condition like “while app timer > 1”

Best, Chris

2 Likes

Hey @vfeliufto To support @Chris‘s great suggestion, a photo to show this type of logic in use. In my example, I have an event that occurs every 5 seconds as as long as a switch/var combo are set to true ONLY. If they are false, it won’t run. Yours would be Something like Chris said above, repeat while timer value is greater than 0

2 Likes

Thank you very much! @Chris

Thank you very much @jared!

1 Like