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

Unified Diff: base/message_loop/message_pump_default.cc

Issue 1311863002: Reland of move 1 ms rounding up of task delays on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_pump_default.cc
diff --git a/base/message_loop/message_pump_default.cc b/base/message_loop/message_pump_default.cc
index daa80d853236a132f880f17de3a382f75f39c5dc..27c19e0227bc6f9d6c0f0d71562a2d14c466a42c 100644
--- a/base/message_loop/message_pump_default.cc
+++ b/base/message_loop/message_pump_default.cc
@@ -3,8 +3,6 @@
// found in the LICENSE file.
#include "base/message_loop/message_pump_default.h"
-
-#include <algorithm>
#include "base/logging.h"
#include "base/threading/thread_restrictions.h"
@@ -54,13 +52,6 @@
event_.Wait();
} else {
TimeDelta delay = delayed_work_time_ - TimeTicks::Now();
-#if defined(OS_WIN)
- // If the delay is greater than zero and under 1 ms we need to round up to
- // 1 ms or else we will end up spinning until it counts down to zero
- // because sub-ms waits aren't supported on Windows.
- if (delay > TimeDelta())
- delay = std::max(delay, TimeDelta::FromMilliseconds(1));
-#endif
if (delay > TimeDelta()) {
event_.TimedWait(delay);
} else {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698