summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--input/input.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/input/input.c b/input/input.c
index ed9a15c017..b6dc43c79d 100644
--- a/input/input.c
+++ b/input/input.c
@@ -1008,10 +1008,8 @@ static void input_wait_read(struct input_ctx *ictx, int time)
static void input_wait_read(struct input_ctx *ictx, int time)
{
- if (time > 0) {
- struct timespec deadline = mpthread_get_deadline(time / 1000.0);
- pthread_cond_timedwait(&ictx->wakeup, &ictx->mutex, &deadline);
- }
+ if (time > 0)
+ mpthread_cond_timedwait_rel(&ictx->wakeup, &ictx->mutex, time / 1000.0);
for (int i = 0; i < ictx->num_fds; i++)
read_fd(ictx, &ictx->fds[i]);