summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-01-30 00:07:31 +0000
committerRoger Dingledine <arma@torproject.org>2005-01-30 00:07:31 +0000
commit8e7fc8d25998a4f464824d7e53321b406bb5e781 (patch)
treec8d4746f286da087139ec3b663fb432b98e34674 /src/or
parent50c8a9bffee9a669a13db6e316bb30e89b1e785a (diff)
downloadtor-8e7fc8d25998a4f464824d7e53321b406bb5e781.tar.gz
tor-8e7fc8d25998a4f464824d7e53321b406bb5e781.zip
comment about a bug wrt clock skew
svn:r3461
Diffstat (limited to 'src/or')
-rw-r--r--src/or/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 0e0af46b4e..0cfba107c5 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -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;