Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Unified Diff: webrtc/base/gunit.h

Issue 1835053002: Change default timestamp to 64 bits in all webrtc directories. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Add TODO for timestamp. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/base/fileutils.cc ('k') | webrtc/base/logging.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « webrtc/base/fileutils.cc ('k') | webrtc/base/logging.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698