From e2e588175eac4ebe8fb47c0540954d0f78525cce Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 30 Apr 2014 12:48:46 -0400 Subject: New testing-only tor_sleep_msec function In the unit tests I want to loop with a delay, but I want less than a 1 second delay. This, sadly, requires compatibility code. --- src/common/compat.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/common/compat.h') diff --git a/src/common/compat.h b/src/common/compat.h index 314b1aa001..d723448fd4 100644 --- a/src/common/compat.h +++ b/src/common/compat.h @@ -744,6 +744,10 @@ char *format_win32_error(DWORD err); #endif +#ifdef TOR_UNIT_TESTS +void tor_sleep_msec(int msec); +#endif + #ifdef COMPAT_PRIVATE #if !defined(HAVE_SOCKETPAIR) || defined(_WIN32) || defined(TOR_UNIT_TESTS) #define NEED_ERSATZ_SOCKETPAIR -- cgit v1.2.3-54-g00ecf