mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 20:33:31 +01:00
if somebody starts his tor server in jan 2004 and then fixes his
clock, don't make his published uptime be a year. svn:r3337
This commit is contained in:
parent
45eb8d9660
commit
70b3208f0a
@ -765,7 +765,9 @@ static int prepare_for_poll(void) {
|
|||||||
stats_prev_global_read_bucket = global_read_bucket;
|
stats_prev_global_read_bucket = global_read_bucket;
|
||||||
stats_prev_global_write_bucket = global_write_bucket;
|
stats_prev_global_write_bucket = global_write_bucket;
|
||||||
|
|
||||||
stats_n_seconds_working += seconds_elapsed;
|
/* if more than 10s have elapsed, probably the clock changed: doesn't count. */
|
||||||
|
if (seconds_elapsed < 10)
|
||||||
|
stats_n_seconds_working += seconds_elapsed;
|
||||||
|
|
||||||
assert_all_pending_dns_resolves_ok();
|
assert_all_pending_dns_resolves_ok();
|
||||||
run_scheduled_events(now.tv_sec);
|
run_scheduled_events(now.tv_sec);
|
||||||
|
Loading…
Reference in New Issue
Block a user