4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-18 23:12:15 +08:00
ian 3c3c17500c Add inline functions to convert between sbintime_t
and decimal time units. Use them in some existing code that is
vulnerable to roundoff errors.

The existing constant SBT_1NS is a honeypot, luring unsuspecting folks into
writing code such as long_timeout_ns*SBT_1NS to generate the argument for a
sleep call.  The actual value of 1ns in sbt units is ~4.3, leading to a
large roundoff error giving a shorter sleep than expected when multiplying
by the trucated value of 4 in SBT_1NS.  (The evil honeypot aspect becomes
clear after you waste a whole day figuring out why your sleeps return early.)
2018-12-04 07:29:51 +01:00
..
2018-01-17 11:47:26 -06:00
2017-12-07 11:54:11 +00:00
2018-11-08 16:45:19 +00:00
2018-07-30 10:47:57 +02:00
2018-01-17 11:47:26 -06:00
2017-12-07 11:54:11 +00:00
2018-08-29 15:57:27 +02:00
2018-10-18 19:51:39 +02:00
2018-01-17 11:47:30 -06:00
2017-11-29 11:25:46 -06:00
2017-11-29 11:25:45 -06:00
2017-11-29 11:25:45 -06:00
2017-11-29 11:25:46 -06:00
2017-11-29 11:25:46 -06:00