Does the clock component lag?

Does the clock timer lag?
I created a simple stopwatch using the clock component and compared it with an inbuilt stopwatch. After the inbuilt stopwatch reached around 15 seconds, my stopwatch was still running at 6 seconds! :joy:

These are my blocks, hope my logic is correct.
image
image

Clock component works on main thread which will result in lag in your app. But you’ll notice it only if you’ve enabled Timer Always Fires and set the time interval very small.

I think you’ve put many logics which was not necessary. :grimacing:

Yes my Time Interval is 10 milliseconds :frowning_face:

But I need them to make a stopwatch, don’t I?

Wait for few moment. I’ll show the blocks. My PC is rebooting. :sweat_smile:

1 Like

I kept Time Interval = 1000ms because its obvious that the time will decrease by 1 second.

1 Like

Well I know how to create a simple timer like that.

  • I am creating a stopwatch, so time will increase, not decrease.
  • And I want to show the milliseconds too :sweat_smile:

Yes, I had the same problem, but I found a workaround for this:

Save the time, when you start the Clock and everytime, when the Clock done, calc the duration between the starting time and the current time e. g. in milliseconds and set the Lable to this duration.

Then you have a Timer which works nearly 100% exactly.

I hope this helps! :slight_smile:

Then, use + in place of -. And to show ms, divide second by 1000. :wink:

1 Like

between 30 and 60 frames per second

Some experts will tell you that the human eye can see between 30 and 60 frames per second

Assuming it to be 60
I feel your users will barely see change in milli seconds completely

Hello @bodymindpower, I saw Abraham’s post but it doesn’t show milliseconds, although that looks like the almost perfect solution!

Yes, I should have consulted an eye specialist before creating the stopwatch :joy:
Anyways. I’ll try your option too…

I will also try the async extension by @Abhijith_Dominic

I managed it by using multiple clock components.
Thank you for your help!

10 clocks? each at 100ms ? I got this solution but i thought it will face same problem

Not 10 clock, 4 clocks for milliseconds, seconds, minutes and hour.

Ohk got it thank you

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