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

Unified Diff: base/time_win_unittest.cc

Issue 9055001: Change code in base (primarily unit tests) to use Sleep(TimeDelta). (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Qualify windows Sleep calls to go through PlatformThread. Created 9 years 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/time_unittest.cc ('k') | base/timer_unittest.cc » ('j') | 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 3a96b91f216469e677e92a9448380fc6adf50d35..a60a216a5a9e980b04865d3484ec15f7b1fcb476 100644
--- a/base/time_win_unittest.cc
+++ b/base/time_win_unittest.cc
@@ -220,7 +220,8 @@ TEST(TimeTicks, Drift) {
// Sleep for a few milliseconds (note that it means 1000 microseconds).
// If we check the drift too frequently, it's going to increase
// monotonically, making our measurement less realistic.
- base::PlatformThread::Sleep((i % 2 == 0) ? 1 : 2);
+ base::PlatformThread::Sleep(
+ base::TimeDelta::FromMilliseconds((i % 2 == 0) ? 1 : 2));
total_drift += drift_microseconds;
}
« no previous file with comments | « base/time_unittest.cc ('k') | base/timer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698