diff options
| author | 2020-02-16 21:06:15 +0000 | |
|---|---|---|
| committer | 2020-02-16 21:06:15 +0000 | |
| commit | 396be90974e3f4ba4e470cc88584f036d03c4475 (patch) | |
| tree | 8a781e13666ce2e29c36c4daf850c6fcd73272d0 /usr.bin/dig/lib/isc/unix/time.c | |
| parent | The timer type we are using requires interval to be set, remove (diff) | |
| download | wireguard-openbsd-396be90974e3f4ba4e470cc88584f036d03c4475.tar.xz wireguard-openbsd-396be90974e3f4ba4e470cc88584f036d03c4475.zip | |
Reduce interval indirection by setting struct members directly and
using macros from sys/time.h
OK millert
Diffstat (limited to 'usr.bin/dig/lib/isc/unix/time.c')
| -rw-r--r-- | usr.bin/dig/lib/isc/unix/time.c | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/usr.bin/dig/lib/isc/unix/time.c b/usr.bin/dig/lib/isc/unix/time.c index e666dfc042c..77c581a0016 100644 --- a/usr.bin/dig/lib/isc/unix/time.c +++ b/usr.bin/dig/lib/isc/unix/time.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: time.c,v 1.9 2020/02/16 21:04:44 florian Exp $ */ +/* $Id: time.c,v 1.10 2020/02/16 21:06:15 florian Exp $ */ /*! \file */ @@ -43,32 +43,6 @@ * need an initialized type. */ -/*% - *** Intervals - ***/ - -void -interval_set(struct timespec *i, time_t seconds, long nanoseconds) -{ - REQUIRE(i != NULL); - REQUIRE(nanoseconds < NS_PER_S); - - i->tv_sec = seconds; - i->tv_nsec = nanoseconds; -} - -isc_boolean_t -interval_iszero(const struct timespec *i) { - REQUIRE(i != NULL); - INSIST(i->tv_nsec < NS_PER_S); - - if (!timespecisset(i)) - return (ISC_TRUE); - - return (ISC_FALSE); -} - - /*** *** Absolute Times ***/ |
