1234567891011121314151617181920212223242526 |
- /* Copyright (c) 2003-2004, Roger Dingledine
- * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
- * Copyright (c) 2007-2016, The Tor Project, Inc. */
- /* See LICENSE for licensing information */
- #ifndef TOR_COMPAT_TIME_H
- #define TOR_COMPAT_TIME_H
- #include "orconfig.h"
- #if !defined(HAVE_GETTIMEOFDAY) && !defined(HAVE_STRUCT_TIMEVAL_TV_SEC)
- /** Implementation of timeval for platforms that don't have it. */
- struct timeval {
- time_t tv_sec;
- unsigned int tv_usec;
- };
- #endif
- void tor_gettimeofday(struct timeval *timeval);
- #ifdef TOR_UNIT_TESTS
- void tor_sleep_msec(int msec);
- #endif
- #endif
|