]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Apply algebra; remove a condition
authorNick Mathewson <nickm@torproject.org>
Thu, 17 Apr 2003 02:03:55 +0000 (02:03 +0000)
committerNick Mathewson <nickm@torproject.org>
Thu, 17 Apr 2003 02:03:55 +0000 (02:03 +0000)
svn:r246

src/common/util.c

index 600a8e614d83d3f2ef66d06aa7b1cafafbb4203d..e5e83532d70a68b7b8e2335e5bda629de9591ad4 100644 (file)
@@ -30,10 +30,15 @@ tv_udiff(struct timeval *start, struct timeval *end)
     log(LOG_NOTICE, "tv_udiff(): comparing times too far apart.");
     return LONG_MAX;
   }
+
+  /*
+    This is a no-op: "secdiff--" takes 1M from the final result,
+    and "end_usec+=100000L" puts it back.
   if (end_usec < start->tv_usec) {
     secdiff--;
     end_usec += 1000000L;
   }
+  */
   udiff = secdiff*1000000L + (end_usec - start->tv_usec);
   if(udiff < 0) {
     log(LOG_NOTICE, "tv_udiff(): start is after end. Returning 0.");