Hi
Can someone help me? My application has 2 timers. One is the normal TTimer one with a period of 1s. However, sometimes the fetching of data and its processing and delay can take longer than the period, which lead to random seizures. A good suggestion from a forum member suggested disabling the timer on entering its function and re-enabling at the end, eg.
procedure TMainForm.ClockTimer(TSender:Object);
begin
Clock.Enabled := false;
//fetch, process & display a lot of data
Clock.Enabled := true;
end;
I then have a second timer running in its own thread, also with a period of 1s, called uThreadTimer. The code for this was also provided by a helpful soul on the forum. This timer just displays time and date info.
However, the problem is that often the clock display misses a second or more. The time is correct, but the display does not increment every second. It therefore appears that there is interaction between the 2 timers, even though they are running in separate threads?
Is it possible to give uThreadTimer a greater priority and would this help?
Thanks
Brian
RasPi model 3, fpc3.0.0, lazarus 1.7, SVN Rev 51308, arm-linux-gtk2