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

Unified Diff: base/threading/platform_thread_win.cc

Issue 8965072: Add function support for Sleep and MessageLoop with TimeDelta input. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix comment spacing. 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/platform_thread_posix.cc ('k') | base/threading/thread_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/platform_thread_win.cc
diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc
index d4fda25903fcea290b2cc22eb74b0458f0f7d266..5cd96c169f141ad2461e70e897aa01d513ef0bc1 100644
--- a/base/threading/platform_thread_win.cc
+++ b/base/threading/platform_thread_win.cc
@@ -114,6 +114,11 @@ void PlatformThread::Sleep(int duration_ms) {
}
// static
+void PlatformThread::Sleep(TimeDelta duration) {
+ ::Sleep(duration.InMillisecondsRoundedUp());
+}
+
+// static
void PlatformThread::SetName(const char* name) {
current_thread_name.Set(const_cast<char*>(name));
tracked_objects::ThreadData::InitializeThreadContext(name);
« no previous file with comments | « base/threading/platform_thread_posix.cc ('k') | base/threading/thread_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698