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.24.2.3.10.4 2004/03/11 05:58:42 marka Exp $ */
+/* $Id: time.c,v 1.24.2.3.10.5 2008/08/29 04:05:30 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