[DUG]Timers

Jeremy North jeremy.north at gmail.com
Tue Mar 7 13:32:44 NZDT 2006


Matthew,

Drop a TTimer on a form and set the interval to 10000. (10secs)
Drop a Memo on the form
In the OnTimer event add the following code:

  Memo1.Lines.Add('Enter: ' + FormatDateTime('hh:nn:ss', now));
  sleep(5000);
  Memo1.Lines.Add('Leave: ' + FormatDateTime('hh:nn:ss', now));

>From what you are saying you believe the difference between the Enter
entries in the Memo would be 15 seconds correct?

That is not what I observe.

cheers,
Jeremy

On 3/7/06, Matthew Comb <matt at ferndigital.com> wrote:
> actually the timer resolution was 30 seconds, and execute was 20 seconds,
> you got it the wrong way around.
>
> If you want to say that the execute took 2 seconds instead of 20 seconds
> then thats fine. My point is still the same. The resolution on the timer
> becomes 32 seconds instead of 30 seconds.
>
> Matt.
>
> >> In johns case if his code executed took 20 seconds for example, and the
> >> resolution on the timer is 30 seconds, then the combined resolution
> >> would
> >> be 50 seconds.
> >
> > What is the point of firing a timer every 20 seconds that would
> > require 30 seconds to run the code it fired?
> >
> > That scenario doesn't make sense to me.
> >
> > cheers,
> > Jeremy
> >
> > _______________________________________________
> > Delphi mailing list
> > Delphi at ns3.123.co.nz
> > http://ns3.123.co.nz/mailman/listinfo/delphi
> >
>
>
> _______________________________________________
> Delphi mailing list
> Delphi at ns3.123.co.nz
> http://ns3.123.co.nz/mailman/listinfo/delphi
>



More information about the Delphi mailing list