diff options
| author | 2020-02-16 21:11:02 +0000 | |
|---|---|---|
| committer | 2020-02-16 21:11:02 +0000 | |
| commit | a12dcefb48e200107d0d2d0ced8c8d9c25cb6d86 (patch) | |
| tree | 9fb057b930c99b994191b88919f80cc550e5796c /usr.bin/dig/lib/isc/unix/time.c | |
| parent | Move isc_time_formathttptimestamp to the only place it is used. (diff) | |
| download | wireguard-openbsd-a12dcefb48e200107d0d2d0ced8c8d9c25cb6d86.tar.xz wireguard-openbsd-a12dcefb48e200107d0d2d0ced8c8d9c25cb6d86.zip | |
clock_gettime cannot fail if called correctly; unravel TIME_NOW
indirections.
(I'm not convinced that we always want to read CLOCK_REALTIME, in fact
we probably want to almost always read CLOCK_MONOTONIC.)
OK millert
Diffstat (limited to 'usr.bin/dig/lib/isc/unix/time.c')
| -rw-r--r-- | usr.bin/dig/lib/isc/unix/time.c | 13 |
1 files changed, 1 insertions, 12 deletions
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; |
