Module: wine Branch: refs/heads/master Commit: 4d1d49b78a731abe46986cfae0083154d3c578b8 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=4d1d49b78a731abe46986cfa...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Jul 27 14:39:50 2006 +0200
server: Round up the timeout for poll() to avoid redundant calls.
---
server/fd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/server/fd.c b/server/fd.c index 319f55c..6df422e 100644 --- a/server/fd.c +++ b/server/fd.c @@ -516,7 +516,7 @@ static int get_next_timeout(void) { struct timeout_user *timeout = LIST_ENTRY( ptr, struct timeout_user, entry ); int diff = (timeout->when.tv_sec - now.tv_sec) * 1000 - + (timeout->when.tv_usec - now.tv_usec) / 1000; + + (timeout->when.tv_usec - now.tv_usec + 999) / 1000; if (diff < 0) diff = 0; return diff; }