Re: Timer accuracy.
- From: erewhon@xxxxxxxxxx (J French)
- Date: Thu, 5 Jan 2006 09:48:19 +0000 (UTC)
On Wed, 4 Jan 2006 15:32:03 -0000, "Mike Williams"
<Mike@xxxxxxxxxxxxxxxxx> wrote:
>"J French" <erewhon@xxxxxxxxxx> wrote in message
>news:43bba18d.9477587@xxxxxxxxxxxxxxxxxxxxxxx
>
>> This is what I used for measuring time, it uses the high
>> resolution timer and is more accurate than GetTickCount
>> Private Declare Function timeGetTime _
>> Lib "winmm.dll" () As Long
>
>You have to be a bit careful about the timeGetTime function Jerry. Under
>Win98 it defaults to a 1 millisecond resolution, but under Win XP it usually
>doesn't. On my XP system the default resolution of timeGetTime is somewhere
>between 15 and 16 milliseconds.
Mike, thanks a lot for the heads up on this
My main use of it has been for slowing down sending data to the RS232
provided by a USB on Win XP to a Zebra printer
If I did not slow things down so that I sent no more than 3 bytes in
2ms then I would get a buffer overflow on the printer, which I could
only put down to the CTS coming up too slowly
I found that GetTickCount made things run dog slow on Win 95 with a
real RS232 so I resorted to timeGetTime
It is probably working Ok on the XP machines because the system is in
a tight loop, is the foreground application with nothing else
(significant) running on the machine.
I'll need to look into this - thanks again
.
- References:
- Re: Timer accuracy.
- From: J French
- Re: Timer accuracy.
- From: Mike Williams
- Re: Timer accuracy.
- Prev by Date: Re: How to make shoutcut visible to all user?
- Next by Date: Re: Find out WHO last modified a file
- Previous by thread: Re: Timer accuracy.
- Next by thread: Re: Timer accuracy.
- Index(es):
Relevant Pages
|