diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2019-05-30 19:59:02 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@his.com> | 2019-06-10 00:27:23 +0000 |
commit | ab1b99130f98a3767589519c37ce78b3dcb8ce8e (patch) | |
tree | 90a36ad0040f8619f0b9dc19801d51661409d2f5 | |
parent | 040eeec1d8034dbf2f432d792c90dbedc5148aea (diff) |
fix a syntax mess introduced by R6.6 ifdef'ing
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
-rw-r--r-- | src/NextEvent.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/NextEvent.c b/src/NextEvent.c index 49f6f8e..75e74ad 100644 --- a/src/NextEvent.c +++ b/src/NextEvent.c @@ -326,24 +326,26 @@ static void AdjustTimes ( wait_times_ptr_t wt) { if (app->timerQueue != NULL && !ignoreTimers && block) { +#ifndef USE_POLL if (IS_AFTER (wt->cur_time, app->timerQueue->te_timer_value)) { TIMEDELTA (wt->wait_time, app->timerQueue->te_timer_value, wt->cur_time); if (howlong == NULL || IS_AFTER (wt->wait_time, wt->max_wait_time)) -#ifndef USE_POLL wt->wait_time_ptr = &wt->wait_time; else wt->wait_time_ptr = &wt->max_wait_time; } else wt->wait_time_ptr = &zero_time; - } #else + if (IS_AFTER (wt->cur_time, app->timerQueue->te_timer_value)) { + TIMEDELTA (wt->wait_time, app->timerQueue->te_timer_value, wt->cur_time); + if (howlong == NULL || IS_AFTER (wt->wait_time, wt->max_wait_time)) wt->poll_wait = (int) (wt->wait_time.tv_sec * 1000 + wt->wait_time.tv_usec / 1000); else wt->poll_wait = (int) (wt->max_wait_time.tv_sec * 1000 + wt->max_wait_time.tv_usec / 1000); } else wt->poll_wait = X_DONT_BLOCK; - } #endif + } } |