Index: webrtc/base/gunit.h |
diff --git a/webrtc/base/gunit.h b/webrtc/base/gunit.h |
index 5ba0bd916e6632a50c8754b4fe07c061a69b12dc..ad52a43c824d3cf705edd51bd7bd7cf669d7ef98 100644 |
--- a/webrtc/base/gunit.h |
+++ b/webrtc/base/gunit.h |
@@ -21,25 +21,25 @@ |
#endif |
// Wait until "ex" is true, or "timeout" expires. |
-#define WAIT(ex, timeout) \ |
- for (int64_t start = rtc::TimeMillis(); \ |
- !(ex) && rtc::TimeMillis() < start + timeout;) { \ |
- rtc::Thread::Current()->ProcessMessages(0); \ |
- rtc::Thread::Current()->SleepMs(1); \ |
+#define WAIT(ex, timeout) \ |
+ for (int64_t start = rtc::SystemTimeMillis(); \ |
+ !(ex) && rtc::SystemTimeMillis() < start + timeout;) { \ |
+ rtc::Thread::Current()->ProcessMessages(0); \ |
+ rtc::Thread::Current()->SleepMs(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 { \ |
- int64_t start = rtc::TimeMillis(); \ |
- res = (ex); \ |
- while (!res && rtc::TimeMillis() < start + timeout) { \ |
- rtc::Thread::Current()->ProcessMessages(0); \ |
- rtc::Thread::Current()->SleepMs(1); \ |
- res = (ex); \ |
- } \ |
+#define WAIT_(ex, timeout, res) \ |
+ do { \ |
+ int64_t start = rtc::SystemTimeMillis(); \ |
+ res = (ex); \ |
+ while (!res && rtc::SystemTimeMillis() < start + timeout) { \ |
+ rtc::Thread::Current()->ProcessMessages(0); \ |
+ rtc::Thread::Current()->SleepMs(1); \ |
+ res = (ex); \ |
+ } \ |
} while (0) |
// The typical EXPECT_XXXX and ASSERT_XXXXs, but done until true or a timeout. |