From a12dcefb48e200107d0d2d0ced8c8d9c25cb6d86 Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 16 Feb 2020 21:11:02 +0000 Subject: 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 --- usr.bin/dig/lib/isc/unix/time.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'usr.bin/dig/lib/isc/unix/time.c') 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; -- cgit v1.2.3-59-g8ed1b