diff options
author | Ed Swierk <eswierk@aristanetworks.com> | 2009-07-23 14:13:34 -0700 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-07-27 14:09:15 -0500 |
commit | bf73f39649a12e03e8aa0c49b193ab78ef253b5c (patch) | |
tree | 70855b52e113a80e01fa7c51364bac483be1bde2 /slirp.h | |
parent | 1f9c6ef318bfd896a2a5afc728cd5a586ecf8bfb (diff) | |
download | slirp-bf73f39649a12e03e8aa0c49b193ab78ef253b5c.zip slirp-bf73f39649a12e03e8aa0c49b193ab78ef253b5c.tar.gz slirp-bf73f39649a12e03e8aa0c49b193ab78ef253b5c.tar.bz2 |
slirp: Use monotonic clock if available (v2)
Calling gettimeofday() to compute a time interval can cause problems if
the system clock jumps forwards or backwards; replace updtime() with
qemu_get_clock(rt_clock), which calls clock_gettime(CLOCK_MONOTONIC) if
it is available.
Also remove some useless macros.
Signed-off-by: Ed Swierk <eswierk@aristanetworks.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'slirp.h')
-rw-r--r-- | slirp.h | 4 |
1 files changed, 0 insertions, 4 deletions
@@ -108,10 +108,6 @@ typedef unsigned int u_int32_t; #include <arpa/inet.h> #endif -#ifdef GETTIMEOFDAY_ONE_ARG -#define gettimeofday(x, y) gettimeofday(x) -#endif - /* Systems lacking strdup() definition in <string.h>. */ #if defined(ultrix) char *strdup(const char *); |