On Wed, 29 Feb 2012, Tom Weber wrote:

The timestamps generated by _libssh2_debug() measure time since a quite arbitrary point in time. It's the first time the function was called, rounded down to the previous whole second. So if gettimeofday() returned 1000000.123456 the first time, the time 1000000.000000 is taken as the reference. So if the next call occurs at gettimeofday() 1000000.456789, _libssh2_debug() would print 0.456789 as timestamp, instead of 0.333333 which is the actual time difference. This caused some confusion as my application mixes these printouts with similar ones with proper calculation, so the time could seem to jump up and down by as much as a second in the logs.

My patch saves also the second fraction at the first call, and makes a proper calculation using carry.

Excellent.

Can you please resubmit the patch made with diff -u instead or even directly with git? That makes it much easier for us to apply and even to review the change inlined.


--

 / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Reply via email to