This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]