[DUG] TTimer
Alister Christie
alister at salespartner.co.nz
Thu Jul 20 12:09:01 NZST 2006
I think OnTimer events can be skipped if the machine is busy - I
remember a thread some time ago (a year maybe) about this but can't
remember any details. Have you got some other kind of loop in your
application that could be working really hard, or maybe a resource leak?
Alister Christie
Computers for People
Ph: 04 471 1849 Fax: 04 471 1266
http://www.salespartner.co.nz
PO Box 13085
Johnsonville
Wellington
John Bird wrote:
> I have a couple of applications with a timer loop that is prone to
> occasionally freezing after a few hours, not doing anything radical, for
> example displaying a date and time.
>
> procedure TfrmJBCLMenu1.Timer1Timer(Sender: TObject);
> begin
>
> lblToday.caption:=formatDateTime('dd mmm yy - hh:nn:ss',now);
>
> end;
>
>
> I noticed when the timer has stopped running that the rest of the
> application runs ok, but seems also a bit sluggish, that is buttons respond
> but slowly.
>
> I put a bit of wake up code run when certain buttons are pressed like
>
> //clock sometimes freezes...
> procedure TfrmJBCLMenu1.WakeClock;
> begin
> timer1.Enabled:=false;
> sleep(500);
> timer1.Enabled:=true;
> end;
>
> But I am thinking this shouldn't be needed!, and I am not sure it always
> fixes it anyway.
>
> Any suggestions to stop timers freezing? Any known problems?
>
> John
>
> _______________________________________________
> Delphi mailing list
> Delphi at ns3.123.co.nz
> http://ns3.123.co.nz/mailman/listinfo/delphi
>
>
>
More information about the Delphi
mailing list