aboutsummaryrefslogtreecommitdiff
path: root/src/common/compat.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-04-30 12:48:46 -0400
committerNick Mathewson <nickm@torproject.org>2014-06-14 11:40:27 -0400
commite2e588175eac4ebe8fb47c0540954d0f78525cce (patch)
tree4326a57028c03348a7ddb7518eae7e244de9461a /src/common/compat.h
parent34f8723dc784142b30d92bbbdeb37089ae7a3bc5 (diff)
downloadtor-e2e588175eac4ebe8fb47c0540954d0f78525cce.tar
tor-e2e588175eac4ebe8fb47c0540954d0f78525cce.tar.gz
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.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/compat.h b/src/common/compat.h
index 314b1aa00..d723448fd 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