Questions about clock components

I tested the clock component and it will be slower when it executes 1 second.(Compared to my mobile phone time)
And the longer the time, the more the difference.

Will everyone be like this?:thinking:

Maybe yes. Say that in the bugs section/topic :wink:

1 Like

But I am not sure if there is a mistake, maybe my time is faster.
So I want to ask if you have this question.:blush:

It’s a bug. I have already try it.

1 Like

This issue is important because it affects many applications.
For example: countdown application

this is how the clock works
the blocks inside the clock.timer event also need a few milliseconds to execute and in the end this adds up…

see here how to correctly program a countdown app App Inventor Tutorials and Examples: Countdown | Pura Vida Apps

Taifun

5 Likes

The Clock just needs a bit more time to load. What I have experienced is if we don’t disable the timer when it fires, it can skip blocks.

2 Likes

If I want to adjust the milliseconds, how much do I need to adjust to be the same as the time of the phone?:thinking:

You can’t. Devices have different speed. Maybe the difference is just some ms, they are not equal.

1 Like

So the clock component can’t be used as a timer?
Can only do other things, such as making objects move?

can you elaborate?
see also these threads

Here’s an old thread on accurate timing …
https://groups.google.com/forum/#!msg/mitappinventortest/z2SLQnv8dU4/-jhdoXMBxU4J
from the Waiting and Timing section of the App Inventor FAQ
https://groups.google.com/forum/#!msg/mitappinventortest/2F51UhB4z0A/IcuCSPpOAgAJ
by ABG

Taifun

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.