summaryrefslogtreecommitdiffstats
path: root/base/spin_wait.h
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-10 16:35:47 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-10 16:35:47 +0000
commit85632fab9c8f30b4651f06fd75e1ba5881226e6c (patch)
tree45e5c31224f7b5951fbefb387da4f3fbf7acbd85 /base/spin_wait.h
parent99aae10b7b9cd4c1e08bb4e978c822483864e331 (diff)
downloadchromium_src-85632fab9c8f30b4651f06fd75e1ba5881226e6c.zip
chromium_src-85632fab9c8f30b4651f06fd75e1ba5881226e6c.tar.gz
chromium_src-85632fab9c8f30b4651f06fd75e1ba5881226e6c.tar.bz2
Switch to using TimeTicks for profiling and histograms
Avoid using wall clock time, which can be changed by the user, or impacted by Daylight Savings transitions etc. BUG=14193 r=eroman Review URL: http://codereview.chromium.org/1253005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46821 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/spin_wait.h')
-rw-r--r--base/spin_wait.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/base/spin_wait.h b/base/spin_wait.h
index d6571b7..b1e2045 100644
--- a/base/spin_wait.h
+++ b/base/spin_wait.h
@@ -35,11 +35,11 @@
(expression))
#define SPIN_FOR_TIMEDELTA_OR_UNTIL_TRUE(delta, expression) do { \
- base::Time start = base::Time::Now(); \
+ base::TimeTicks start = base::TimeTicks::Now(); \
const base::TimeDelta kTimeout = delta; \
while (!(expression)) { \
- if (kTimeout < base::Time::Now() - start) { \
- EXPECT_LE((base::Time::Now() - start).InMilliseconds(), \
+ if (kTimeout < base::TimeTicks::Now() - start) { \
+ EXPECT_LE((base::TimeTicks::Now() - start).InMilliseconds(), \
kTimeout.InMilliseconds()) << "Timed out"; \
break; \
} \