Timer elapsed event called twice

I have a problem with the clock timer:
The TimerInterval of Clock1 is set to 10000 initially in the designer.
The app start counting correctly, 10, 20, 30, then, after setting TimerInterval to 1000, the count goes by two instead of 1. As if the timer fires twice every second. Could it be a bug or is it my misunderstanding?
Any help would be very much appreciated.

blocks

try this:

Thanks a lot, it works. I did not know I had to disable the timer before changing the Interval.
Best regards.

Just I am curious, why this does not work?
It looks weird that I need to disable and enable the timer for every elapsed event, even when it is not necessary.

blocks (1)

I edited my initial reply. Any ideas?
Excuse me if you already got a notification, I am quite inexpert in the community.
Thanks again & regards.

because you have to disabled/enabled the clock every time. And in that example you are only disabling/enabling when count=30....

But I only need to change the interval when count=30. If I do not change the interval the timer gets counting without problems, that is generating timer elapsed events without needing disabling and enabling every time. ???

yes, that's true, even if you set the clock with 1000ms interval from the beginning...I don't know why.

That is why I think it can be a bug. Thanks a lot anyway.

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