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

Unified Diff: base/time_win_unittest.cc

Issue 9836125: Fix base::CPU detection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move drift test Created 8 years, 9 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 | « base/cpu_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/time_win_unittest.cc
diff --git a/base/time_win_unittest.cc b/base/time_win_unittest.cc
index e3ba09a690764b417976693317521daf8eec412a..3dbf075df609cfc0bf347ed61eb1f2a01b6896f6 100644
--- a/base/time_win_unittest.cc
+++ b/base/time_win_unittest.cc
@@ -208,6 +208,10 @@ TEST(TimeTicks, TimerPerformance) {
}
TEST(TimeTicks, Drift) {
+ // If QPC is disabled, this isn't measuring anything.
+ if (!TimeTicks::IsHighResClockWorking())
+ return;
+
const int kIterations = 100;
int64 total_drift = 0;
@@ -227,8 +231,7 @@ TEST(TimeTicks, Drift) {
}
// Sanity check. We expect some time drift to occur, especially across
- // the number of iterations we do. However, if the QPC is disabled, this
- // is not measuring anything (drift is zero in that case).
+ // the number of iterations we do.
EXPECT_LT(0, total_drift);
printf("average time drift in microseconds: %lld\n",
« no previous file with comments | « base/cpu_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698