]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- dnsoverquic, use the functions from util/timeval_func.h.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 25 Aug 2023 08:17:15 +0000 (10:17 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 25 Aug 2023 08:17:15 +0000 (10:17 +0200)
util/netevent.c

index 6663e1f6993dc52c7aef8baa5e772c404a11777f..5fbe826d0671b08bda6cd780f04cb1f2e9131d3d 100644 (file)
@@ -2026,38 +2026,6 @@ doq_accept(struct comm_point* c, struct doq_pkt_addr* paddr,
        return 1;
 }
 
-/** subtract timers and the values do not overflow or become negative */
-static void
-timeval_subtract(struct timeval* d, const struct timeval* end, 
-       const struct timeval* start)
-{
-#ifndef S_SPLINT_S
-       time_t end_usec = end->tv_usec;
-       d->tv_sec = end->tv_sec - start->tv_sec;
-       if(end_usec < start->tv_usec) {
-               end_usec += 1000000;
-               d->tv_sec--;
-       }
-       d->tv_usec = end_usec - start->tv_usec;
-#endif
-}
-
-/** compare of time values */
-static int
-timeval_smaller(const struct timeval* x, const struct timeval* y)
-{
-#ifndef S_SPLINT_S
-       if(x->tv_sec < y->tv_sec)
-               return 1;
-       else if(x->tv_sec == y->tv_sec) {
-               if(x->tv_usec <= y->tv_usec)
-                       return 1;
-               else    return 0;
-       }
-       else    return 0;
-#endif
-}
-
 /** doq pickup a timer to wait for for the worker. If any timer exists. */
 static void
 doq_pickup_timer(struct comm_point* c)