curl-library
consistently increasing timer resolutions
Date: Thu, 18 Dec 2008 19:24:34 +0100 (CET)
Hi,
when looking into the implementations of the timeouts with millisecond
resolution added in 2007, I stumbled upon the current status that there
are three different time sources configurable to measure accurately
enough so they are useful, but practically they still don't provide
higher resolution, because the interaction of the timing with the
networking code is done using sleep and poll system calls with 1 second
resolution. I found that the new timout interfaces can be made useful
rather quickly by employing setitimer system calls and using a higher
resolution in the polls. Attached is a proof of concept patch which
integrates these changes. It may need some cleanup, especially to avoid
breakage using more exotic combinations of preprocessor defines, but
maybe it's already interesting for some people willing to experiment
with the timing behavior. I'd be glad to receive comments if someone
finds it useful or interesting.
Best regards,
Isidor Zeuner
- text/x-patch attachment: curl-hires.diff