diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-07-13 10:18:15 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-07-19 11:40:47 +0200 |
commit | 2a217ef72392d685e6c9b48b2be3b467a8244b48 (patch) | |
tree | b4522f1456714baa265fc7c2ef208ee1da59d20d /src/common/compat_time.h | |
parent | 7bc4ca7de9d434edeb21525917c81d6963a26511 (diff) | |
download | tor-2a217ef72392d685e6c9b48b2be3b467a8244b48.tar.gz tor-2a217ef72392d685e6c9b48b2be3b467a8244b48.zip |
Expose monotonic time ratchet functions for testing.
Diffstat (limited to 'src/common/compat_time.h')
-rw-r--r-- | src/common/compat_time.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/common/compat_time.h b/src/common/compat_time.h index d69af8f98c..8d61bc2580 100644 --- a/src/common/compat_time.h +++ b/src/common/compat_time.h @@ -133,14 +133,17 @@ void tor_sleep_msec(int msec); #endif #ifdef COMPAT_TIME_PRIVATE -#ifdef _WIN32 +#if defined(_WIN32) || defined(TOR_UNIT_TESTS) STATIC int64_t ratchet_performance_counter(int64_t count_raw); STATIC int64_t ratchet_coarse_performance_counter(int64_t count_raw); #endif -#ifdef MONOTIME_USING_GETTIMEOFDAY +#if defined(MONOTIME_USING_GETTIMEOFDAY) || defined(TOR_UNIT_TESTS) STATIC void ratchet_timeval(const struct timeval *timeval_raw, struct timeval *out); #endif +#ifdef TOR_UNIT_TESTS +void monotime_reset_ratchets_for_testing(void); +#endif #endif #endif |