Alexandre Julliard : user32/tests: Make the initial timeout longer in flush_events() for machines with slower round-trip times.
Alexandre Julliard
julliard at winehq.org
Wed Mar 5 13:41:11 CST 2008
Module: wine
Branch: master
Commit: d6a17d2c931dc716c32087c04af2081afd5770d9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d6a17d2c931dc716c32087c04af2081afd5770d9
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Mar 5 16:48:04 2008 +0100
user32/tests: Make the initial timeout longer in flush_events() for machines with slower round-trip times.
---
dlls/user32/tests/dde.c | 4 +++-
dlls/user32/tests/msg.c | 6 ++++--
dlls/user32/tests/win.c | 4 +++-
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/dlls/user32/tests/dde.c b/dlls/user32/tests/dde.c
index e90d8c9..eb875e3 100644
--- a/dlls/user32/tests/dde.c
+++ b/dlls/user32/tests/dde.c
@@ -45,13 +45,15 @@ static void flush_events(void)
{
MSG msg;
int diff = default_timeout;
+ int min_timeout = 50;
DWORD time = GetTickCount() + diff;
while (diff > 0)
{
- if (MsgWaitForMultipleObjects( 0, NULL, FALSE, min(10,diff), QS_ALLINPUT ) == WAIT_TIMEOUT) break;
+ if (MsgWaitForMultipleObjects( 0, NULL, FALSE, min_timeout, QS_ALLINPUT ) == WAIT_TIMEOUT) break;
while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg );
diff = time - GetTickCount();
+ min_timeout = 10;
}
}
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index 7d5dffa..69bba8b 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -1543,14 +1543,16 @@ static void add_message(const struct message *msg)
static void flush_events(void)
{
MSG msg;
- int diff = 100;
+ int diff = 200;
+ int min_timeout = 50;
DWORD time = GetTickCount() + diff;
while (diff > 0)
{
- if (MsgWaitForMultipleObjects( 0, NULL, FALSE, min(10,diff), QS_ALLINPUT ) == WAIT_TIMEOUT) break;
+ if (MsgWaitForMultipleObjects( 0, NULL, FALSE, min_timeout, QS_ALLINPUT ) == WAIT_TIMEOUT) break;
while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg );
diff = time - GetTickCount();
+ min_timeout = 10;
}
}
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index bf8e4fe..661a7e8 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -63,13 +63,15 @@ static void flush_events(void)
{
MSG msg;
int diff = 200;
+ int min_timeout = 50;
DWORD time = GetTickCount() + diff;
while (diff > 0)
{
- if (MsgWaitForMultipleObjects( 0, NULL, FALSE, min(10,diff), QS_ALLINPUT ) == WAIT_TIMEOUT) break;
+ if (MsgWaitForMultipleObjects( 0, NULL, FALSE, min_timeout, QS_ALLINPUT ) == WAIT_TIMEOUT) break;
while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg );
diff = time - GetTickCount();
+ min_timeout = 10;
}
}
More information about the wine-cvs
mailing list