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

Unified Diff: base/process_util_posix.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/message_loop_unittest.cc ('k') | base/process_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process_util_posix.cc
diff --git a/base/process_util_posix.cc b/base/process_util_posix.cc
index addd1c3aa181a3b7742ec7ea803b9018d34634e7..5a1d4425bbb280f1a501c6bccfa08caf33ee1bcf 100644
--- a/base/process_util_posix.cc
+++ b/base/process_util_posix.cc
@@ -31,7 +31,6 @@
#include "base/third_party/dynamic_annotations/dynamic_annotations.h"
#include "base/threading/platform_thread.h"
#include "base/threading/thread_restrictions.h"
-#include "base/time.h"
#if defined(OS_FREEBSD)
#include <sys/event.h>
@@ -1197,7 +1196,7 @@ bool WaitForProcessesToExit(const FilePath::StringType& executable_name,
result = true;
break;
}
- base::PlatformThread::Sleep(100);
+ base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(100));
} while ((end_time - base::Time::Now()) > base::TimeDelta());
return result;
@@ -1264,7 +1263,7 @@ class BackgroundReaper : public PlatformThread::Delegate {
// Wait for 2 * timeout_ 500 milliseconds intervals.
for (unsigned i = 0; i < 2 * timeout_; ++i) {
- PlatformThread::Sleep(500); // 0.5 seconds
+ PlatformThread::Sleep(TimeDelta::FromMilliseconds(500));
if (IsChildDead(child_))
return;
}
« no previous file with comments | « base/message_loop_unittest.cc ('k') | base/process_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698