Index: base/message_loop/message_loop.cc |
diff --git a/base/message_loop/message_loop.cc b/base/message_loop/message_loop.cc |
index 16b999c27845c3a6265372124bc632941339fa65..c01e5421bc3478605c5a0b16ef15d36a6bb9af78 100644 |
--- a/base/message_loop/message_loop.cc |
+++ b/base/message_loop/message_loop.cc |
@@ -616,8 +616,11 @@ bool MessageLoop::DoIdleWork() { |
// _if_ triggered by the timer happens with good resolution. If we don't |
// do this the default resolution is 15ms which might not be acceptable |
// for some tasks. |
- in_high_res_mode_ = pending_high_res_tasks_ > 0; |
- Time::ActivateHighResolutionTimer(in_high_res_mode_); |
+ bool high_res = pending_high_res_tasks_ > 0; |
+ if (high_res != in_high_res_mode_) { |
+ in_high_res_mode_ = high_res; |
+ Time::ActivateHighResolutionTimer(in_high_res_mode_); |
+ } |
#endif |
return false; |
} |