[Bug manual/14450] timeval_subtract example is erroneous
siddhesh at redhat dot com
sourceware-bugzilla@sourceware.org
Tue Dec 11 03:11:00 GMT 2012
http://sourceware.org/bugzilla/show_bug.cgi?id=14450
Siddhesh Poyarekar <siddhesh at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |siddhesh at redhat dot com
Resolution| |INVALID
--- Comment #2 from Siddhesh Poyarekar <siddhesh at redhat dot com> 2012-12-11 03:11:17 UTC ---
Not really. timeval is not simply tv_sec.tv_usec. It is tv_sec + tv_usec /
1000000. They have different semantics when tv_sec is negative. So you read:
{-10, 999999}
as
-10 + 999999/1000000 = -9.000001
and not
-10.999999
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list