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

Unified Diff: base/time_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/threading/watchdog_unittest.cc ('k') | base/time_win_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/time_unittest.cc
diff --git a/base/time_unittest.cc b/base/time_unittest.cc
index 6ba03b8c114133336bf9a504860afb597315b973..261b831fe85cd20f10c6e23bc8c5cb70da6d81df 100644
--- a/base/time_unittest.cc
+++ b/base/time_unittest.cc
@@ -311,7 +311,7 @@ TEST_F(TimeTest, ParseTimeTestInvalidString) {
TEST(TimeTicks, Deltas) {
for (int index = 0; index < 50; index++) {
TimeTicks ticks_start = TimeTicks::Now();
- base::PlatformThread::Sleep(10);
+ base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(10));
TimeTicks ticks_stop = TimeTicks::Now();
TimeDelta delta = ticks_stop - ticks_start;
// Note: Although we asked for a 10ms sleep, if the
« no previous file with comments | « base/threading/watchdog_unittest.cc ('k') | base/time_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698