diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-04-30 12:48:46 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-06-14 11:40:27 -0400 |
commit | e2e588175eac4ebe8fb47c0540954d0f78525cce (patch) | |
tree | 4326a57028c03348a7ddb7518eae7e244de9461a /src/common/compat.h | |
parent | 34f8723dc784142b30d92bbbdeb37089ae7a3bc5 (diff) | |
download | tor-e2e588175eac4ebe8fb47c0540954d0f78525cce.tar.gz tor-e2e588175eac4ebe8fb47c0540954d0f78525cce.zip |
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.
Diffstat (limited to 'src/common/compat.h')
-rw-r--r-- | src/common/compat.h | 4 |
1 files changed, 4 insertions, 0 deletions
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 |