aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xext/sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/Xext/sync.c')
-rw-r--r--xorg-server/Xext/sync.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/xorg-server/Xext/sync.c b/xorg-server/Xext/sync.c
index 7129e9833..49c262c57 100644
--- a/xorg-server/Xext/sync.c
+++ b/xorg-server/Xext/sync.c
@@ -2730,27 +2730,24 @@ IdleTimeBlockHandler(void *pCounter, struct timeval **wt, void *LastSelectMask)
* If we've been idle more than it, and someone wants to know about
* that level-triggered, schedule an immediate wakeup.
*/
- unsigned long timeout = -1;
if (XSyncValueLessThan(idle, *greater)) {
XSyncValue value;
Bool overflow;
XSyncValueSubtract(&value, *greater, idle, &overflow);
- timeout = min(timeout, XSyncValueLow32(value));
+ AdjustWaitForDelay(wt, XSyncValueLow32(value));
}
else {
for (list = counter->sync.pTriglist; list;
list = list->next) {
trig = list->pTrigger;
if (trig->CheckTrigger(trig, old_idle)) {
- timeout = min(timeout, 0);
+ AdjustWaitForDelay(wt, 0);
break;
}
}
}
-
- AdjustWaitForDelay(wt, timeout);
}
counter->value = old_idle; /* pop */