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

Unified Diff: base/tools_sanity_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/timer_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/tools_sanity_unittest.cc
diff --git a/base/tools_sanity_unittest.cc b/base/tools_sanity_unittest.cc
index 547fc98c9669849f48c761a1eecad00db0d743c9..60ac015af5c251e9c3d36ec2e814f70a86a53ed8 100644
--- a/base/tools_sanity_unittest.cc
+++ b/base/tools_sanity_unittest.cc
@@ -170,7 +170,7 @@ class TOOLS_SANITY_TEST_CONCURRENT_THREAD : public PlatformThread::Delegate {
// Sleep for a few milliseconds so the two threads are more likely to live
// simultaneously. Otherwise we may miss the report due to mutex
// lock/unlock's inside thread creation code in pure-happens-before mode...
- PlatformThread::Sleep(100);
+ PlatformThread::Sleep(TimeDelta::FromMilliseconds(100));
}
private:
bool *value_;
@@ -186,7 +186,7 @@ class ReleaseStoreThread : public PlatformThread::Delegate {
// Sleep for a few milliseconds so the two threads are more likely to live
// simultaneously. Otherwise we may miss the report due to mutex
// lock/unlock's inside thread creation code in pure-happens-before mode...
- PlatformThread::Sleep(100);
+ PlatformThread::Sleep(TimeDelta::FromMilliseconds(100));
}
private:
base::subtle::Atomic32 *value_;
@@ -198,7 +198,7 @@ class AcquireLoadThread : public PlatformThread::Delegate {
~AcquireLoadThread() {}
void ThreadMain() {
// Wait for the other thread to make Release_Store
- PlatformThread::Sleep(100);
+ PlatformThread::Sleep(TimeDelta::FromMilliseconds(100));
base::subtle::Acquire_Load(value_);
}
private:
« no previous file with comments | « base/timer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698