mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-27 07:59:35 +01:00
27 lines
607 B
C
27 lines
607 B
C
|
/* 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
|
||
|
|