| Index: webrtc/base/gunit.h
|
| diff --git a/webrtc/base/gunit.h b/webrtc/base/gunit.h
|
| index 986d4dcb623d70000679589b91d85fad00ca919e..c5a9bad27e9d95d1b58d88f6980a65ec2a69c019 100644
|
| --- a/webrtc/base/gunit.h
|
| +++ b/webrtc/base/gunit.h
|
| @@ -16,21 +16,22 @@
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| // Wait until "ex" is true, or "timeout" expires.
|
| -#define WAIT(ex, timeout) \
|
| - for (uint32_t start = rtc::Time(); !(ex) && rtc::Time() < start + timeout;) \
|
| +#define WAIT(ex, timeout) \
|
| + for (int64_t start = rtc::TimeMillis(); \
|
| + !(ex) && rtc::TimeMillis() < start + timeout;) \
|
| rtc::Thread::Current()->ProcessMessages(1);
|
|
|
| // This returns the result of the test in res, so that we don't re-evaluate
|
| // the expression in the XXXX_WAIT macros below, since that causes problems
|
| // when the expression is only true the first time you check it.
|
| -#define WAIT_(ex, timeout, res) \
|
| - do { \
|
| - uint32_t start = rtc::Time(); \
|
| - res = (ex); \
|
| - while (!res && rtc::Time() < start + timeout) { \
|
| - rtc::Thread::Current()->ProcessMessages(1); \
|
| - res = (ex); \
|
| - } \
|
| +#define WAIT_(ex, timeout, res) \
|
| + do { \
|
| + int64_t start = rtc::TimeMillis(); \
|
| + res = (ex); \
|
| + while (!res && rtc::TimeMillis() < start + timeout) { \
|
| + rtc::Thread::Current()->ProcessMessages(1); \
|
| + res = (ex); \
|
| + } \
|
| } while (0)
|
|
|
| // The typical EXPECT_XXXX and ASSERT_XXXXs, but done until true or a timeout.
|
|
|