lib: Remove timeval_until()
[gd/samba-autobuild/.git] / lib / util / time.c
index a47af20a35010341c1279cbcca88c7ca76809200..fe2a2b499f5e7b8dc57ba436fbcbc1dd11c96d34 100644 (file)
@@ -766,29 +766,6 @@ _PUBLIC_ struct timeval timeval_max(const struct timeval *tv1,
        return *tv2;
 }
 
-/**
-  return the difference between two timevals as a timeval
-  if tv1 comes after tv2, then return a zero timeval
-  (this is *tv2 - *tv1)
-*/
-_PUBLIC_ struct timeval timeval_until(const struct timeval *tv1,
-                            const struct timeval *tv2)
-{
-       struct timeval t;
-       if (timeval_compare(tv1, tv2) >= 0) {
-               return timeval_zero();
-       }
-       t.tv_sec = tv2->tv_sec - tv1->tv_sec;
-       if (tv1->tv_usec > tv2->tv_usec) {
-               t.tv_sec--;
-               t.tv_usec = 1000000 - (tv1->tv_usec - tv2->tv_usec);
-       } else {
-               t.tv_usec = tv2->tv_usec - tv1->tv_usec;
-       }
-       return t;
-}
-
-
 /**
   convert a timeval to a NTTIME
 */