TTimer Interval confusion lazarus / 43-Android ---------------------------------------------------------------------- simsam · 2013-03-19 12:46 Hello, I have an issue with TTimer. I placed three timers on the androidlcl form and each of these timers simply increases a counter and writes the result to a label: Timer1.Interval = 500 Timer2.Interval = 1000 Timer3.Interval = 2000 procedure TForm1.Timer1Timer(Sender : TObject) begin   Inc(counter1);   Label1.Caption := IntToStr(counter1); end; procedure TForm1.Timer2Timer(Sender : TObject) begin   Inc(counter2);   Label2.Caption := IntToStr(counter2); end; procedure TForm1.Timer3Timer(Sender : TObject) begin   Inc(counter3);   Label3.Caption := IntToStr(counter3); end; The result of all of this is that all the counters increase at the same rate of around 500ms. LogCat tells me that all the timers have been created with their respective interval. Anyone having this same issue? In my app I worked around it by having only one timer running a base cycle and doing the timing stuff from there. But that's not cool. ---------------------------------------------------------------------- jhmos · 2013-03-19 14:21 Quote from: simsam on March 19, 2013, 01:46:57 pm In my app I worked around it by having only one timer running a base cycle and doing the timing stuff from there. Unfortunately, thats what you have to do. Works the same under MS windows. I vaguely recall when I looked at this problem, that the only way to have multiple timers is to use multiple threads (with all that added complexity). ---------------------------------------------------------------------- Graeme · 2013-03-19 14:58 Quote from: simsam on March 19, 2013, 01:46:57 pmThe result of all of this is that all the counters increase at the same rate of around 500ms. That is clearly a bug in LCL+Android. Please file a bug report in Mantis (http://bugs.freepascal.org/my_view_page.php). ---------------------------------------------------------------------- User137 · 2013-03-19 17:51 Quote from: jhmos on March 19, 2013, 03:21:09 pmWorks the same under MS windows. I vaguely recall when I looked at this problem, that the only way to have multiple timers is to use multiple threads (with all that added complexity).No, i just tried this on Lazarus 1.1 on Win32 and 3 labels are growing number at different paces, depending on interval.