]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Bugfix: some things (like ctrl-z) can make a second take more than one second
authorNick Mathewson <nickm@torproject.org>
Tue, 13 Jul 2004 18:07:57 +0000 (18:07 +0000)
committerNick Mathewson <nickm@torproject.org>
Tue, 13 Jul 2004 18:07:57 +0000 (18:07 +0000)
svn:r2042

src/or/main.c

index 24fd1d31cbaa8f74c44d77ccf4490d291c0cc41e..6b3aa686727ed06a8db6dc8a24613a6910f71828 100644 (file)
@@ -555,7 +555,7 @@ static int prepare_for_poll(void) {
 
   if(now.tv_sec > current_second) { /* the second has rolled over. check more stuff. */
 
-    ++stats_n_seconds_uptime;
+    stats_n_seconds_uptime += (now.tv_sec - current_second);
     assert_all_pending_dns_resolves_ok();
     run_scheduled_events(now.tv_sec);
     assert_all_pending_dns_resolves_ok();