summaryrefslogtreecommitdiff
path: root/src/or/circuitmux_ewma.c
diff options
context:
space:
mode:
authorAndrea Shepard <andrea@torproject.org>2012-10-01 20:08:36 -0700
committerAndrea Shepard <andrea@torproject.org>2012-10-10 00:44:47 -0700
commit0c4f717b3e83e86fc8646d3803c1e435c6af246d (patch)
treea11e973426b5d4fe593af25d50762be68a88d588 /src/or/circuitmux_ewma.c
parent8afe41b481caa984fa6b4a0fbbf626d4cd22ce59 (diff)
downloadtor-0c4f717b3e83e86fc8646d3803c1e435c6af246d.tar.gz
tor-0c4f717b3e83e86fc8646d3803c1e435c6af246d.zip
Implement cell_ewma_enabled()
Diffstat (limited to 'src/or/circuitmux_ewma.c')
-rw-r--r--src/or/circuitmux_ewma.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/circuitmux_ewma.c b/src/or/circuitmux_ewma.c
index 6d4fcc98cf..c918d6ff8a 100644
--- a/src/or/circuitmux_ewma.c
+++ b/src/or/circuitmux_ewma.c
@@ -520,6 +520,7 @@ cell_ewma_to_circuit(cell_ewma_t *ewma)
*
* These tick values are not meant to be shared between Tor instances, or used
* for other purposes. */
+
static unsigned
cell_ewma_tick_from_timeval(const struct timeval *now,
double *remainder_out)
@@ -532,6 +533,13 @@ cell_ewma_tick_from_timeval(const struct timeval *now,
return res;
}
+/** Tell the caller whether ewma_enabled is set */
+int
+cell_ewma_enabled(void)
+{
+ return ewma_enabled;
+}
+
/** Compute and return the current cell_ewma tick. */
unsigned int
cell_ewma_get_tick(void)