diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2020-02-16 21:11:32 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2020-02-16 21:11:32 +0000 |
commit | ed0e281a02ae80b75e61dcd55e94e9a2db9c06d3 (patch) | |
tree | 20eb59a7373607d6d14e80b1d65b31945e35dd2e | |
parent | 22b44ad7e83b0b79d24b2dd8a5fff2693f4d6135 (diff) |
cleanup
OK millert
-rw-r--r-- | usr.bin/dig/lib/isc/unix/include/isc/time.h | 10 | ||||
-rw-r--r-- | usr.bin/dig/lib/isc/unix/time.c | 18 |
2 files changed, 4 insertions, 24 deletions
diff --git a/usr.bin/dig/lib/isc/unix/include/isc/time.h b/usr.bin/dig/lib/isc/unix/include/isc/time.h index e225b7292c4..5d294edfe60 100644 --- a/usr.bin/dig/lib/isc/unix/include/isc/time.h +++ b/usr.bin/dig/lib/isc/unix/include/isc/time.h @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: time.h,v 1.14 2020/02/16 21:11:02 florian Exp $ */ +/* $Id: time.h,v 1.15 2020/02/16 21:11:31 florian Exp $ */ #ifndef ISC_TIME_H #define ISC_TIME_H 1 @@ -22,13 +22,9 @@ /*! \file */ #include <sys/time.h> -#include <time.h> -#include <isc/types.h> - -/*** - *** Absolute Times - ***/ +#include <inttypes.h> +#include <time.h> uint64_t isc_time_microdiff(const struct timespec *t1, const struct timespec *t2); diff --git a/usr.bin/dig/lib/isc/unix/time.c b/usr.bin/dig/lib/isc/unix/time.c index ed4e821cd73..d073515bfbd 100644 --- a/usr.bin/dig/lib/isc/unix/time.c +++ b/usr.bin/dig/lib/isc/unix/time.c @@ -14,17 +14,12 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: time.c,v 1.17 2020/02/16 21:11:02 florian Exp $ */ +/* $Id: time.c,v 1.18 2020/02/16 21:11:31 florian Exp $ */ /*! \file */ #include <sys/time.h> - -#include <errno.h> -#include <limits.h> -#include <stdio.h> #include <time.h> -#include <string.h> #include <isc/time.h> #include <isc/util.h> @@ -32,17 +27,6 @@ #define NS_PER_S 1000000000 /*%< Nanoseconds per second. */ #define NS_PER_US 1000 /*%< Nanoseconds per microsecond. */ -/* - * All of the INSIST()s checks of nanoseconds < NS_PER_S are for - * consistency checking of the type. In lieu of magic numbers, it - * is the best we've got. The check is only performed on functions which - * need an initialized type. - */ - -/*** - *** Absolute Times - ***/ - uint64_t isc_time_microdiff(const struct timespec *t1, const struct timespec *t2) { struct timespec res; |