summaryrefslogtreecommitdiffstats
path: root/base/spin_wait.h
diff options
context:
space:
mode:
authordsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-27 20:43:33 +0000
committerdsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-27 20:43:33 +0000
commite1acf6f902e50222baf99bfb492ecc38a1604975 (patch)
tree503d45705b14be7e2f1ed86c71d6064abbf90fbe /base/spin_wait.h
parenta2f5993e1ce940e8a8eec900abaeed02e2eee09b (diff)
downloadchromium_src-e1acf6f902e50222baf99bfb492ecc38a1604975.zip
chromium_src-e1acf6f902e50222baf99bfb492ecc38a1604975.tar.gz
chromium_src-e1acf6f902e50222baf99bfb492ecc38a1604975.tar.bz2
Move Time, TimeDelta and TimeTicks into namespace base.
Review URL: http://codereview.chromium.org/7995 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4022 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/spin_wait.h')
-rw-r--r--base/spin_wait.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/base/spin_wait.h b/base/spin_wait.h
index 86818af..36ae083 100644
--- a/base/spin_wait.h
+++ b/base/spin_wait.h
@@ -31,14 +31,15 @@
// that the test passes, even if load varies, and external events vary.
#define SPIN_FOR_1_SECOND_OR_UNTIL_TRUE(expression) \
- SPIN_FOR_TIMEDELTA_OR_UNTIL_TRUE(TimeDelta::FromSeconds(1), (expression))
+ SPIN_FOR_TIMEDELTA_OR_UNTIL_TRUE(base::TimeDelta::FromSeconds(1), \
+ (expression))
#define SPIN_FOR_TIMEDELTA_OR_UNTIL_TRUE(delta, expression) do { \
- Time start = Time::Now(); \
- const TimeDelta kTimeout = delta; \
+ base::Time start = base::Time::Now(); \
+ const base::TimeDelta kTimeout = delta; \
while(!(expression)) { \
- if (kTimeout < Time::Now() - start) { \
- EXPECT_LE((Time::Now() - start).InMilliseconds(), \
+ if (kTimeout < base::Time::Now() - start) { \
+ EXPECT_LE((base::Time::Now() - start).InMilliseconds(), \
kTimeout.InMilliseconds()) << "Timed out"; \
break; \
} \
@@ -48,4 +49,3 @@
while(0)
#endif // BASE_SPIN_WAIT_H__
-