Alexandre Julliard : server: Round up the timeout for poll()
to avoid redundant calls.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Jul 27 08:18:48 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: 4d1d49b78a731abe46986cfae0083154d3c578b8
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=4d1d49b78a731abe46986cfae0083154d3c578b8
Author: Alexandre Julliard <julliard at 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;
}
More information about the wine-cvs
mailing list