version 1.13, 2015/08/11 16:43:04 |
version 1.14, 2015/08/11 16:49:50 |
|
|
/* |
/* |
* Sleep. Calculate the number off milliseconds poll(2) must |
* Sleep. Calculate the number off milliseconds poll(2) must |
* wait before the timo_update() needs to be called. If there're |
* wait before the timo_update() needs to be called. If there're |
* no timeouts scheduled, then call poll(2) with -1 timeout. |
* no timeouts scheduled, then call poll(2) with INFTIM timeout. |
*/ |
*/ |
#ifdef DEBUG |
#ifdef DEBUG |
clock_gettime(CLOCK_MONOTONIC, &sleepts); |
clock_gettime(CLOCK_MONOTONIC, &sleepts); |
|
|
if (timo < TIMER_MSEC) |
if (timo < TIMER_MSEC) |
timo = TIMER_MSEC; |
timo = TIMER_MSEC; |
} else |
} else |
timo = -1; |
timo = INFTIM; |
res = poll(pfds, nfds, timo); |
res = poll(pfds, nfds, timo); |
if (res < 0) { |
if (res < 0) { |
if (errno != EINTR) |
if (errno != EINTR) |