zero if the input was less than NS_INTERVAL
nanoseconds. Round up instead. [RT #18549]
+2430. [bug] win32: isc_interval_set() could round down to
+ zero if the input was less than NS_INTERVAL
+ nanoseconds. Round up instead. [RT #18549]
+
2429. [doc] nsupdate should be in section 1 of the man pages.
[RT #18283]
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: time.c,v 1.38 2004/03/16 05:52:22 marka Exp $ */
+/* $Id: time.c,v 1.38.18.1 2008/08/29 04:05:45 marka Exp $ */
#include <config.h>
REQUIRE(i != NULL);
REQUIRE(nanoseconds < NS_PER_S);
+ /*
+ * This rounds nanoseconds up not down.
+ */
i->interval = (LONGLONG)seconds * INTERVALS_PER_S
- + nanoseconds / NS_INTERVAL;
+ + (nanoseconds + NS_INTERVAL - 1) / NS_INTERVAL;
}
isc_boolean_t