From 61ce6dcb40df9aee9f6557ebee0a306aecb312ee Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 21 Jul 2016 12:36:13 +0200 Subject: Make monotime test mocking work with oom tests. --- src/or/relay.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/or') 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); -- cgit v1.2.3-54-g00ecf