[PATCH][BZ #14450] Fix timeval example in manual

Siddhesh Poyarekar siddhesh@redhat.com
Tue Dec 11 03:07:00 GMT 2012


On Mon, Dec 10, 2012 at 02:48:38PM -0800, Roland McGrath wrote:
> Why do we need such hairy code in the example?
> The timersub macro in sys/time.h is far simpler.

Actually I just noticed that the fix is wrong and the original
behaviour is correct.  The reporter (and I) looked at timeval as
tv_sec.tv_usec when it should be tv_sec + tv_usec/1000000.  They have
different semantics when tv_sec is negative.

Siddhesh



More information about the Libc-alpha mailing list