2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-23 18:49:54 +00:00

21 Commits

Author SHA1 Message Date
David Lawrence
6fa1cb5754 189. [func] isc_time_secondsastimet(), a new function, will ensure
that the number of seconds in an isc_time_t does not
                        exceed the range of a time_t, or return ISC_R_RANGE.
                        Similarly, isc_time_now(), isc_time_nowplusinterval(),
                        isc_time_add() and isc_time_subtract() now check the
                        range for overflow/underflow.  In the case of
                        isc_time_subtract, this changed a calling requirement
                        (ie, something that could generate an assertion)
                        into merely a condition that returns an error result.
                        isc_time_add() and isc_time_subtract() were void-
                        valued before but now return isc_result_t.

The seconds member isc_time_t on Unix platforms was changed from time_t
to unsigned int.

unix/time.c now uses macros for nanoseconds per second, nanoseconds per
microsecond and microseconds per second to make sure that the right
number of zeros appears each place the constant is used.

unix/time.c functions which take initialized isc_(interval|time)_t arguments
INSIST() that the nanoseconds value is less than one full second.

unix/time.c's isc_time_microdiff was broken because it did multiplication and
addition with unsigned integers and attempted to set them a 64 bit int to
avoid overflow, but C's ints don't promote to 64 bits on machines that only
have 32 bit longs.  Fixed.

Added all the pertinent documentation to time.h.
2000-05-18 17:08:32 +00:00
David Lawrence
6e3a8256ee need <sys/time.h> on some platforms 2000-05-08 16:30:49 +00:00
David Lawrence
1a69a1a78c Megacommit of dozens of files.
Cleanup of redundant/useless header file inclusion.

ISC style lint, primarily for function declarations and standalone
comments -- ie, those that appear on a line without any code, which
should be written as follows:
   /*
    * This is a comment.
    */
2000-05-08 14:38:29 +00:00
Bob Halley
364a82f7c2 include isc/util.h 2000-04-28 01:12:23 +00:00
David Lawrence
585529aaeb 71. [cleanup] Made explicit the implicit REQUIREs of
isc_time_seconds, isc_time_nanoseconds, and
                        isc_time_subtract.

  70.   [func]          isc_time_set() added.
2000-04-24 20:58:03 +00:00
David Lawrence
114d0d1642 added isc_time_seconds, isc_time_nanoseconds 2000-03-10 17:49:27 +00:00
Bob Halley
ca41b452ed update copyrights 2000-02-03 23:08:31 +00:00
Bob Halley
f924db5119 1000 nanoseconds in a microsecond, not 10000 1999-11-04 21:40:49 +00:00
David Lawrence
4ad9b25e6d new function isc_time_microdiff 1999-10-09 02:40:32 +00:00
Michael Graff
2f072c2982 Update copyrights 1999-09-15 23:03:43 +00:00
Bob Halley
afdb3abb9b zero interval and epoch; rename _get() to _now(); add _nowplusinterval() 1999-06-12 01:15:05 +00:00
Bob Halley
3740b569ae the great type change 1998-12-13 23:45:21 +00:00
Bob Halley
1633838b82 update copyrights 1998-12-12 20:48:14 +00:00
Bob Halley
d25afd60ee include config.h 1998-12-12 19:25:20 +00:00
Bob Halley
da4242bf62 replace unexpect.[ch] and fatal.[ch] with error.[ch] 1998-12-04 20:00:26 +00:00
Bob Halley
4d6964d70a checkpoint 1998-10-26 23:07:57 +00:00
Bob Halley
4bed2e84a3 opaque isc_time_t; add isc_interval_t; UNIX-specific conversions 1998-10-23 23:01:41 +00:00
Bob Halley
0bbadb0a2f portability 1998-10-22 01:59:50 +00:00
Bob Halley
bf6d2e3912 more renaming 1998-10-22 01:33:20 +00:00
Bob Halley
f47bb8d1f3 many name conversions 1998-10-21 01:13:50 +00:00
Bob Halley
94e25967cd add 1998-10-15 01:20:28 +00:00