On 23 Jun 2005 11:00:12 -0700,
jimfortune@compumarc.com wrote:
[color=blue]
>Angelo wrote:[color=green]
>> mark, this is a common request but not a commonly known solution. There
>> are 2 ways to attack this problem.
>>
>> 1) u can use the system clock and a function GetTickCount Lib
>> "kernel32"() to get the time elapsed since midnight. This time is
>> returned in milliseconds. and then u work from there. i really can't
>> comment more on this method without data def.[/color]
>
>IIRC, the system clock, although returning something that looks like it
>is accurate to a millisecond, is quite a bit less accurate in practice.
>The numbers aren't too far off but they can vary considerably within
>the second depending on what the OS is doing at the moment. I'm not
>[/color]
And that's the problem. The clock itself is reasonably accurate. However,
there is always some delay between when you ask for the time and when the
computer gets around to actually giving it to you. The problem is that the
deley is an unmeasurable variable. "depending on what the OS is doing at the
moment." Chuck.
[color=blue]
>talking about a slowing clock setting due to a dying battery on the
>motherboard. I wouldn't count on the system clock being closer than
>about .05 second to the actual fraction of a second. In short, the
>clock ticks themselves are not perfectly regular so don't assume you're
>getting perfect accuracy in spite of those extra decimals you see. I
>realize this seems strange considering the extraordinary regularity of
>solid-state timers but I read about the system clock variations
>somewhere when I was doing some data acquisition. I don't have the
>reference anymore. YMMV.
>
>James A. Fortune[/color]