]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
comment about a bug wrt clock skew
authorRoger Dingledine <arma@torproject.org>
Sun, 30 Jan 2005 00:07:31 +0000 (00:07 +0000)
committerRoger Dingledine <arma@torproject.org>
Sun, 30 Jan 2005 00:07:31 +0000 (00:07 +0000)
svn:r3461

src/or/main.c

index 0e0af46b4e625213e355b1f88cd54ee729699ca7..0cfba107c538607ff1aec7a45cdf071f1a70483e 100644 (file)
@@ -869,6 +869,12 @@ static void second_elapsed_callback(int fd, short event, void *args)
   /* the second has rolled over. check more stuff. */
   bytes_written = stats_prev_global_write_bucket - global_write_bucket;
   bytes_read = stats_prev_global_read_bucket - global_read_bucket;
+  /* XXX below we get suspicious if time jumps forward more than 10
+   * seconds, but we never notice if it jumps *back* more than 10 seconds.
+   * This could be useful for detecting that we just NTP'ed to three
+   * weeks ago and it will be 3 weeks and 15 minutes until any of our
+   * events trigger.
+   */
   seconds_elapsed = current_second ? (now.tv_sec - current_second) : 0;
   stats_n_bytes_read += bytes_read;
   stats_n_bytes_written += bytes_written;