]> git.ipfire.org Git - thirdparty/tor.git/commit
Use timevals, not time_t, when expiring circuits.
authorNick Mathewson <nickm@torproject.org>
Sat, 26 Mar 2011 05:34:42 +0000 (01:34 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 30 Mar 2011 18:41:41 +0000 (14:41 -0400)
commitaa950e6c48471f00ff9497fa4e9fad1c71e75868
tree58a1a24fafb531c7f4214cba8a1bf98041fe6ae6
parent5eaba5ac2128eebf095441e23b6b7516ce35dd5d
Use timevals, not time_t, when expiring circuits.

We've got millisecond timers now, we might as well use them.

This change won't actually make circuits get expiered with microsecond
precision, since we only call the expiry functions once per second.
Still, it should avoid the situation where we have a circuit get
expired too early because of rounding.

A couple of the expiry functions now call tor_gettimeofday: this
should be cheap since we're only doing it once per second.  If it gets
to be called more often, though, we should onsider having the current
time be an argument again.
changes/cbt_hi_res [new file with mode: 0644]
src/or/circuitbuild.c
src/or/circuitlist.c
src/or/circuituse.c
src/or/circuituse.h
src/or/main.c
src/or/or.h
src/or/rephist.c