summaryrefslogtreecommitdiff
path: root/src/or/circuitlist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-10-15 12:35:55 -0400
committerNick Mathewson <nickm@torproject.org>2010-10-15 12:38:02 -0400
commit36c5476e7081776fc33bcc3ce1f261666985f5da (patch)
tree246052ef33679d4d43e0cc4c1b70f760679bfb95 /src/or/circuitlist.c
parent94a99ad205665bc387831de37566b9cb16d40397 (diff)
downloadtor-36c5476e7081776fc33bcc3ce1f261666985f5da.tar.gz
tor-36c5476e7081776fc33bcc3ce1f261666985f5da.zip
Fold timestamp_created into highres_created
There's no reason to keep a time_t and a struct timeval to represent the same value: highres_created.tv_sec was the same as timestamp_created. This should save a few bytes per circuit.
Diffstat (limited to 'src/or/circuitlist.c')
-rw-r--r--src/or/circuitlist.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c
index da6d32961b..f654f6caae 100644
--- a/src/or/circuitlist.c
+++ b/src/or/circuitlist.c
@@ -397,8 +397,7 @@ circuit_initial_package_window(void)
static void
init_circuit_base(circuit_t *circ)
{
- circ->timestamp_created = time(NULL);
- tor_gettimeofday(&circ->highres_created);
+ tor_gettimeofday(&circ->timestamp_created);
circ->package_window = circuit_initial_package_window();
circ->deliver_window = CIRCWINDOW_START;
@@ -610,7 +609,8 @@ circuit_dump_details(int severity, circuit_t *circ, int conn_array_index,
log(severity, LD_CIRC, "Conn %d has %s circuit: circID %d (other side %d), "
"state %d (%s), born %d:",
conn_array_index, type, this_circid, other_circid, circ->state,
- circuit_state_to_string(circ->state), (int)circ->timestamp_created);
+ circuit_state_to_string(circ->state),
+ (int)circ->timestamp_created.tv_sec);
if (CIRCUIT_IS_ORIGIN(circ)) { /* circ starts at this node */
circuit_log_path(severity, LD_CIRC, TO_ORIGIN_CIRCUIT(circ));
}