diff options
| author | 2020-02-16 21:08:59 +0000 | |
|---|---|---|
| committer | 2020-02-16 21:08:59 +0000 | |
| commit | ffbbf1a1ba5c66ebfe3fd67d17dc177d3d89b6a0 (patch) | |
| tree | d20590b42a47b49932ecfeffff6a768a6b181bc1 /usr.bin/dig/lib/isc/unix | |
| parent | unravel isc_time_compare (diff) | |
| download | wireguard-openbsd-ffbbf1a1ba5c66ebfe3fd67d17dc177d3d89b6a0.tar.xz wireguard-openbsd-ffbbf1a1ba5c66ebfe3fd67d17dc177d3d89b6a0.zip | |
unravel isc_time_add and isc_time_subtract
OK millert
Diffstat (limited to 'usr.bin/dig/lib/isc/unix')
| -rw-r--r-- | usr.bin/dig/lib/isc/unix/include/isc/time.h | 29 | ||||
| -rw-r--r-- | usr.bin/dig/lib/isc/unix/time.c | 23 |
2 files changed, 2 insertions, 50 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 686d54ed3ea..dda34713ae4 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.10 2020/02/16 21:08:15 florian Exp $ */ +/* $Id: time.h,v 1.11 2020/02/16 21:08:59 florian Exp $ */ #ifndef ISC_TIME_H #define ISC_TIME_H 1 @@ -52,33 +52,6 @@ isc_time_now(struct timespec *t); * Getting the time from the system failed. */ -isc_result_t -isc_time_add(const struct timespec *t, const struct timespec *i, struct timespec *result); -/*%< - * Add 'i' to 't', storing the result in 'result'. - * - * Requires: - * - *\li 't', 'i', and 'result' are valid pointers. - * - * Returns: - *\li Success - */ - -isc_result_t -isc_time_subtract(const struct timespec *t, const struct timespec *i, - struct timespec *result); -/*%< - * Subtract 'i' from 't', storing the result in 'result'. - * - * Requires: - * - *\li 't', 'i', and 'result' are valid pointers. - * - * Returns: - *\li Success - */ - 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 4d63835291c..a0f60d032fd 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.13 2020/02/16 21:08:15 florian Exp $ */ +/* $Id: time.c,v 1.14 2020/02/16 21:08:59 florian Exp $ */ /*! \file */ @@ -58,27 +58,6 @@ isc_time_now(struct timespec *t) { return (ISC_R_SUCCESS); } -isc_result_t -isc_time_add(const struct timespec *t, const struct timespec *i, struct timespec *result) -{ - REQUIRE(t != NULL && i != NULL && result != NULL); - INSIST(t->tv_nsec < NS_PER_S && i->tv_nsec < NS_PER_S); - - timespecadd(t, i, result); - return (ISC_R_SUCCESS); -} - -isc_result_t -isc_time_subtract(const struct timespec *t, const struct timespec *i, - struct timespec *result) -{ - REQUIRE(t != NULL && i != NULL && result != NULL); - INSIST(t->tv_nsec < NS_PER_S && i->tv_nsec < NS_PER_S); - - timespecsub(t, i, result); - return (ISC_R_SUCCESS); -} - uint64_t isc_time_microdiff(const struct timespec *t1, const struct timespec *t2) { struct timespec res; |
