diff options
Diffstat (limited to 'base')
-rw-r--r-- | base/message_loop_proxy_impl.cc | 6 | ||||
-rw-r--r-- | base/timer.cc | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/base/message_loop_proxy_impl.cc b/base/message_loop_proxy_impl.cc index e0ecd89..dd20b39 100644 --- a/base/message_loop_proxy_impl.cc +++ b/base/message_loop_proxy_impl.cc @@ -81,11 +81,11 @@ bool MessageLoopProxyImpl::PostTaskHelper( int64 delay_ms, bool nestable) { AutoLock lock(message_loop_lock_); if (target_message_loop_) { + base::TimeDelta delay = base::TimeDelta::FromMilliseconds(delay_ms); if (nestable) { - target_message_loop_->PostDelayedTask(from_here, task, delay_ms); + target_message_loop_->PostDelayedTask(from_here, task, delay); } else { - target_message_loop_->PostNonNestableDelayedTask(from_here, task, - delay_ms); + target_message_loop_->PostNonNestableDelayedTask(from_here, task, delay); } return true; } diff --git a/base/timer.cc b/base/timer.cc index 9d175f3..5c2aa21 100644 --- a/base/timer.cc +++ b/base/timer.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -25,7 +25,7 @@ void BaseTimer_Helper::InitiateDelayedTask(TimerTask* timer_task) { MessageLoop::current()->PostDelayedTask( timer_task->posted_from_, base::Bind(&TimerTask::Run, base::Owned(timer_task)), - static_cast<int>(timer_task->delay_.InMillisecondsRoundedUp())); + timer_task->delay_); } } // namespace base |