Commit 4d1d49b7 authored by Alexandre Julliard's avatar Alexandre Julliard

server: Round up the timeout for poll() to avoid redundant calls.

parent 55224468
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment