cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: GetTickCount vs QueryPerformanceCounter

From: Igor Novoseltsev <IgorN_at_radvision.com>
Date: Thu, 27 May 2010 18:13:06 +0300

> Given all the above and enough background widely available, I
> sincerely recommend for Windows systems _not_ changing libcurl
> internal usage of GetTickCount() in favour of any other Windows timing
> mechanism.

One note,
according to documentation on GetTickCount()
(http://msdn.microsoft.com/en-us/library/ms724408(VS.85).aspx)
it has a 16 msec resolution, even on the most precious timing hardware.
And libcurl needs 1 msec resolution.

> As a matter of fact for Windows, in order to not miss _any_ timing
> event on any system, most probably we should account for timing errors
> (or imprecision) of 100 miliseconds for any time difference
> measurement.

I believe 20 msec will be good enough,
Since my tests shown the maximum deviation of 16 msec, just like it
appears in the documentation for the GetTickCount().

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-05-27