]> granicus.if.org Git - curl/commit
timeval: Use high resolution timestamps on Windows
authorPavel P <pavlov.pavel@gmail.com>
Mon, 26 Nov 2018 23:10:10 +0000 (15:10 -0800)
committerJay Satiro <raysatiro@yahoo.com>
Sun, 23 Dec 2018 07:30:37 +0000 (02:30 -0500)
commite9ababd4f5aff042dd3b5a4f9568f22e6604d115
tree57d2927109db050fa429e5e78fee5045e085edcd
parentc98ee5f67f497195c9127cc70fa53a487f994cd5
timeval: Use high resolution timestamps on Windows

- Use QueryPerformanceCounter on Windows Vista+

There is confusing info floating around that QueryPerformanceCounter
can leap etc, which might have been true long time ago, but no longer
the case nowadays (perhaps starting from WinXP?). Also, boost and
std::chrono::steady_clock use QueryPerformanceCounter in a similar way.

Prior to this change GetTickCount or GetTickCount64 was used, which has
lower resolution. That is still the case for <= XP.

Fixes https://github.com/curl/curl/issues/3309
Closes https://github.com/curl/curl/pull/3318
lib/timeval.c