Two overlapping timers

Hi,

it seems we’ve found a bug. We have two timers on same page and each has a dynamically assigned interval. If the intervals are same - in our example it’s 30 seconds - then only one of timers is activated every 30 seconds and another one works only every minute. If we change interval values to 30 and 31 seconds then both timers work properly. Could you please explain this phenomena?

Thank yon in advance,
Regards,
Roman

In order to check this outside of our specific environment, I’ve prepared a standalone test with two timers and two rowareas (foldable property). If I set one timer on 2 seconds and another on 4 then the second timer is never updated at all! It looks like if the timer activates during handling of another timer then first event is completely ignored!
The example’s code is below
TwoTimersTest.zip (13 KB)

Hello? Is someone there?

Hi

I assume you are using two timers to call different methods/to do different checks on server side. Have you ever thought to use one timer and to do both checks within one roundtrip? Ie one timer that calls server every 30 seconds and does both checks. You spare the roundtrips of the timer that expires every minute - and in addition page updates are closer to status changes on server side.

Martin

Hi,

itervals of timers are different and set by customer. Defaults are 30 seconds and 12 hours. Of course it’s not a big deal to calculate the difference within one handling function and update timer interval accordingly.
But why should we? Current solution is easier and more readable. Either forbid two timers or make them working.

Regards,
Roman

…yes - timers are considered to be page singletons (like PAGEBODY/TITLEBAR/HEADER/STATUSBAR)…

Regrads!

Well, it’s also a way. But such restriction I would already call a “disadvantage”.

Regards,
Roman