diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-07-21 12:36:13 +0200 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-07-21 07:02:34 -0400 |
commit | 61ce6dcb40df9aee9f6557ebee0a306aecb312ee (patch) | |
tree | eacd4a53cf74bc4f50874bc3519ccc701b50cd38 /src/or/relay.c | |
parent | 50463524a931ea2a3cc5f2b850bf0d43bd4595c5 (diff) | |
download | tor-61ce6dcb40df9aee9f6557ebee0a306aecb312ee.tar.gz tor-61ce6dcb40df9aee9f6557ebee0a306aecb312ee.zip |
Make monotime test mocking work with oom tests.
Diffstat (limited to 'src/or/relay.c')
-rw-r--r-- | src/or/relay.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/or/relay.c b/src/or/relay.c index a815a55d69..51b33cc92c 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -2626,9 +2626,8 @@ channel_flush_from_first_active_circuit, (channel_t *chan, int max)) if (get_options()->CellStatistics || get_options()->TestingEnableCellStatsEvent) { uint32_t msec_waiting; - struct timeval tvnow; - tor_gettimeofday_cached(&tvnow); - msec_waiting = ((uint32_t)tv_to_msec(&tvnow)) - cell->inserted_time; + uint32_t msec_now = (uint32_t)monotime_coarse_absolute_msec(); + msec_waiting = msec_now - cell->inserted_time; if (get_options()->CellStatistics && !CIRCUIT_IS_ORIGIN(circ)) { or_circ = TO_OR_CIRCUIT(circ); |