mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
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>
This commit is contained in:
parent
97df1ee542
commit
aaf10d9d2e
3 changed files with 2 additions and 32 deletions
|
@ -108,10 +108,6 @@ typedef unsigned char u_int8_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 *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue