Re: More accurate Timerevent



On Tue, 21 Nov 2006 21:22:37 GMT, Dirk Claessens <No@xxxxxxxxxxx>
wrote:

On 2006-11-20, Gert Baars (62.194.53.8) wrote in
message <73d6e$4561b3d6$3ec23508$15065@xxxxxxxxxxxxxx>


Hello,

Thank you for info. I'd like to try timeSetEvent but Delphi 7 doesn't
recognize it and helpfunction neither. Do I need to add a .dcu at 'uses'? Is
this somehow documented?

Gert,

Don't bother looking for it... it's a waist of time.
You **cannot** generate accurately timed events on a Windows platform.
As others said: you need hardware.


On modern PC's, You are wrong, and the "others" you mention are also
wrong.

Try the following:


GetTickCount() has a resolution of 1 ms, so we would expect to see it's
value incrementing by 1 ms or there about , right?

The value returned does have a resolution of 1 ms. The timer it is
measuring has a precision which is greater (10-15ms depending). You
simply are misunderstanding the behaviour characteristics of *one* of
the clocks available under Windows.

Time measurement, in any environment, is not a simple as most people
perceive.

For more info on time measurement in general, check out the NTP
reference material.

For a good discussion on PC Hardware Timers, Google for VMWare and
Timers.
--
Please remove '_SpamTrap' when replying. You know why :-(

Peter Ingham
Lower Hutt
New Zealand
.



Relevant Pages

  • Re: Acess ARM9 hardware timers ( C and Linux )
    ... If you are buying an off-the-shelf chip built on an ARM9 core, ... or more hardware timers, at least 16 bits and perhaps more likely 32 ...
    (comp.arch.embedded)
  • Re: Using poll for timeout
    ... timers were provided by the system. ... How could such high resolution timers be implemented? ... mistaken they must be hardware timers(by hardware timer i mean ... nanosecond resolution by using software ?(this is just pure ...
    (comp.unix.programmer)
  • Re: Am I the only one actually using Windows Vista?
    ... One time, at Usenet camp, Dave Howe wrote: ... don't keep prodding the timer. ... Actually, I'm pretty sure that that sticker means they designed the thing to expect the regulation from the hardware timers, then removed the hardware timers. ...
    (alt.sysadmin.recovery)
  • Acess ARM9 hardware timers ( C and Linux )
    ... I'm new to embedded linux development. ... I understand that the ARM9 processors have 16 ... bit hardware timers. ... How do one use these timers in linux from 'C'. ...
    (comp.arch.embedded)