Fix infinite loop in timeout handling on Windows.
This commit is contained in:
parent
58026f72a1
commit
c26581e29f
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ extern int usleep(long long usec);
|
||||||
#define timersub(a, b, r) do {\
|
#define timersub(a, b, r) do {\
|
||||||
(r)->tv_sec = (a)->tv_sec - (b)->tv_sec;\
|
(r)->tv_sec = (a)->tv_sec - (b)->tv_sec;\
|
||||||
(r)->tv_usec = (a)->tv_usec - (b)->tv_usec;\
|
(r)->tv_usec = (a)->tv_usec - (b)->tv_usec;\
|
||||||
if((r)->tv_usec < 1000000)\
|
if((r)->tv_usec < 0)\
|
||||||
(r)->tv_sec--, (r)->tv_usec += 1000000;\
|
(r)->tv_sec--, (r)->tv_usec += 1000000;\
|
||||||
} while (0)
|
} while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue