summaryrefslogtreecommitdiff
path: root/src/or/circuitstats.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/circuitstats.c')
-rw-r--r--src/or/circuitstats.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/or/circuitstats.c b/src/or/circuitstats.c
index 95129f9a43..88ed350a89 100644
--- a/src/or/circuitstats.c
+++ b/src/or/circuitstats.c
@@ -26,8 +26,7 @@
// vary in their own latency. The downside of this is that guards
// can change frequently, so we'd be building a lot more circuits
// most likely.
-/* XXXX024 Make this static; add accessor functions. */
-circuit_build_times_t circ_times;
+static circuit_build_times_t circ_times;
#ifdef TOR_UNIT_TESTS
/** If set, we're running the unit tests: we should avoid clobbering
@@ -37,6 +36,24 @@ static int unit_tests = 0;
#define unit_tests 0
#endif
+circuit_build_times_t *
+get_circuit_build_times(void)
+{
+ return &circ_times;
+}
+
+double
+get_circuit_build_close_time(void)
+{
+ return circ_times.close_ms;
+}
+
+double
+get_circuit_build_timeout(void)
+{
+ return circ_times.timeout_ms;
+}
+
/**
* This function decides if CBT learning should be disabled. It returns
* true if one or more of the following four conditions are met: