diff options
Diffstat (limited to 'usr.bin/dig/lib/isc/unix')
| -rw-r--r-- | usr.bin/dig/lib/isc/unix/app.c | 2 | ||||
| -rw-r--r-- | usr.bin/dig/lib/isc/unix/include/isc/time.h | 18 | ||||
| -rw-r--r-- | usr.bin/dig/lib/isc/unix/time.c | 13 |
3 files changed, 3 insertions, 30 deletions
diff --git a/usr.bin/dig/lib/isc/unix/app.c b/usr.bin/dig/lib/isc/unix/app.c index eebe9a39936..6c6d5daf236 100644 --- a/usr.bin/dig/lib/isc/unix/app.c +++ b/usr.bin/dig/lib/isc/unix/app.c @@ -331,7 +331,7 @@ evloop(isc__appctx_t *ctx) { else { uint64_t us; - TIME_NOW(&now); + clock_gettime(CLOCK_REALTIME, &now); us = isc_time_microdiff(&when, &now); if (us == 0) call_timer_dispatch = ISC_TRUE; 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 9215c8cc972..e225b7292c4 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.13 2020/02/16 21:10:07 florian Exp $ */ +/* $Id: time.h,v 1.14 2020/02/16 21:11:02 florian Exp $ */ #ifndef ISC_TIME_H #define ISC_TIME_H 1 @@ -30,22 +30,6 @@ *** Absolute Times ***/ -isc_result_t -isc_time_now(struct timespec *t); -/*%< - * Set 't' to the current absolute time. - * - * Requires: - * - *\li 't' is a valid pointer. - * - * Returns: - * - *\li Success - *\li Unexpected error - * Getting the time from the system failed. - */ - 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 34b3115a9dc..ed4e821cd73 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.16 2020/02/16 21:10:07 florian Exp $ */ +/* $Id: time.c,v 1.17 2020/02/16 21:11:02 florian Exp $ */ /*! \file */ @@ -43,17 +43,6 @@ *** Absolute Times ***/ -isc_result_t -isc_time_now(struct timespec *t) { - REQUIRE(t != NULL); - - if (clock_gettime(CLOCK_REALTIME, t) == -1) { - UNEXPECTED_ERROR(__FILE__, __LINE__, "%s", strerror(errno)); - return (ISC_R_UNEXPECTED); - } - return (ISC_R_SUCCESS); -} - uint64_t isc_time_microdiff(const struct timespec *t1, const struct timespec *t2) { struct timespec res; |
