summaryrefslogtreecommitdiffstats
path: root/usr.bin/dig/lib/isc/unix
diff options
context:
space:
mode:
authorflorian <florian@openbsd.org>2020-02-16 21:06:53 +0000
committerflorian <florian@openbsd.org>2020-02-16 21:06:53 +0000
commitbb7ec10836894f0524e4282397c8a152f505cb0a (patch)
tree4c8668f233a1c688d4aa85545fa4e2a519d76728 /usr.bin/dig/lib/isc/unix
parentReduce interval indirection by setting struct members directly and (diff)
downloadwireguard-openbsd-bb7ec10836894f0524e4282397c8a152f505cb0a.tar.xz
wireguard-openbsd-bb7ec10836894f0524e4282397c8a152f505cb0a.zip
remove timespec setters
OK millert
Diffstat (limited to 'usr.bin/dig/lib/isc/unix')
-rw-r--r--usr.bin/dig/lib/isc/unix/include/isc/time.h34
-rw-r--r--usr.bin/dig/lib/isc/unix/time.c18
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 917c9715562..f67cba1ccce 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.7 2020/02/16 21:06:15 florian Exp $ */
+/* $Id: time.h,v 1.8 2020/02/16 21:06:54 florian Exp $ */
#ifndef ISC_TIME_H
#define ISC_TIME_H 1
@@ -36,38 +36,6 @@
*** Absolute Times
***/
-void
-isc_time_set(struct timespec *t, time_t seconds, long nanoseconds);
-/*%<
- * Set 't' to a value which represents the given number of seconds and
- * nanoseconds since 00:00:00 January 1, 1970, UTC.
- *
- * Notes:
- *\li The Unix version of this call is equivalent to:
- *\code
- * isc_time_settoepoch(t);
- * interval_set(i, seconds, nanoseconds);
- * isc_time_add(t, i, t);
- *\endcode
- *
- * Requires:
- *\li 't' is a valid pointer.
- *\li nanoseconds < 1000000000.
- */
-
-void
-isc_time_settoepoch(struct timespec *t);
-/*%<
- * Set 't' to the time of the epoch.
- *
- * Notes:
- *\li The date of the epoch is platform-dependent.
- *
- * Requires:
- *
- *\li 't' is a valid pointer.
- */
-
isc_boolean_t
isc_time_isepoch(const struct timespec *t);
/*%<
diff --git a/usr.bin/dig/lib/isc/unix/time.c b/usr.bin/dig/lib/isc/unix/time.c
index 77c581a0016..c1e3003cabb 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.10 2020/02/16 21:06:15 florian Exp $ */
+/* $Id: time.c,v 1.11 2020/02/16 21:06:54 florian Exp $ */
/*! \file */
@@ -47,22 +47,6 @@
*** Absolute Times
***/
-void
-isc_time_set(struct timespec *t, time_t seconds, long nanoseconds) {
- REQUIRE(t != NULL);
- REQUIRE(nanoseconds < NS_PER_S);
-
- t->tv_sec = seconds;
- t->tv_nsec = nanoseconds;
-}
-
-void
-isc_time_settoepoch(struct timespec *t) {
- REQUIRE(t != NULL);
-
- timespecclear(t);
-}
-
isc_boolean_t
isc_time_isepoch(const struct timespec *t) {
REQUIRE(t != NULL);