curl-library
Re: Handling of timeouts on clock jump
Date: Wed, 05 May 2010 14:31:09 -0700
Daniel Stenberg wrote:
> On Wed, 5 May 2010, Chad Monroe wrote:
>
>> I believe any app/library should handle a time of day jump without
>> issue.
>
> We'll appreciate patches!
I could certainly patch this but have a question about libcurl. Is there
any place in the code similar to a main() which is called at a constant
interval (ie usually less than 10 seconds). In the easy case I'm
assuming there is, but what about the multi case? The usual way I've
fixed this in the past is to add a function which gets called frequently
(ie less than once/~10sec) which compares the current time to the last
time the function was executed. If the time differs greater than +/- 10
sec calculate the diff, scan the timer list and update all timers based
on the calculated diff. I'd be happy to patch curl if you can point me
to a place in the code which is executed on a regular interval.
-- Chad Monroe -- This email and any attachments thereto may contain private, confidential, and privileged material for the sole use of the intended recipient. Any review, copying, or distribution of this email (or any attachments thereto) by others is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and permanently delete the original and any copies of this email and any attachments thereto. Please consider the environment before printing this email ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2010-05-05