summaryrefslogtreecommitdiffstats
path: root/base/message_pump_win.cc
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-06 22:23:29 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-06 22:23:29 +0000
commit7e7fab44ba1068bdce201757e82b6650fbca455d (patch)
treea25d1d1235e61672c95d66a7a287cc47f175799f /base/message_pump_win.cc
parentffb65401dabf6ce5a74fcc416690b2525168ab8a (diff)
downloadchromium_src-7e7fab44ba1068bdce201757e82b6650fbca455d.zip
chromium_src-7e7fab44ba1068bdce201757e82b6650fbca455d.tar.gz
chromium_src-7e7fab44ba1068bdce201757e82b6650fbca455d.tar.bz2
Switch to using TimeTicks rather than Time in message loops
Switch to using TimeTicks rather than Time so that we are not dependent on changes in the system clock. r=mbelshe,darin Review URL: http://codereview.chromium.org/3884001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65322 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_pump_win.cc')
-rw-r--r--base/message_pump_win.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/base/message_pump_win.cc b/base/message_pump_win.cc
index d0afd51..0df888a 100644
--- a/base/message_pump_win.cc
+++ b/base/message_pump_win.cc
@@ -66,7 +66,8 @@ int MessagePumpWin::GetCurrentDelay() const {
// Be careful here. TimeDelta has a precision of microseconds, but we want a
// value in milliseconds. If there are 5.5ms left, should the delay be 5 or
// 6? It should be 6 to avoid executing delayed work too early.
- double timeout = ceil((delayed_work_time_ - Time::Now()).InMillisecondsF());
+ double timeout =
+ ceil((delayed_work_time_ - TimeTicks::Now()).InMillisecondsF());
// If this value is negative, then we need to run delayed work soon.
int delay = static_cast<int>(timeout);
@@ -96,7 +97,7 @@ void MessagePumpForUI::ScheduleWork() {
PostMessage(message_hwnd_, kMsgHaveWork, reinterpret_cast<WPARAM>(this), 0);
}
-void MessagePumpForUI::ScheduleDelayedWork(const Time& delayed_work_time) {
+void MessagePumpForUI::ScheduleDelayedWork(const TimeTicks& delayed_work_time) {
//
// We would *like* to provide high resolution timers. Windows timers using
// SetTimer() have a 10ms granularity. We have to use WM_TIMER as a wakeup
@@ -409,7 +410,7 @@ void MessagePumpForIO::ScheduleWork() {
DCHECK(ret);
}
-void MessagePumpForIO::ScheduleDelayedWork(const Time& delayed_work_time) {
+void MessagePumpForIO::ScheduleDelayedWork(const TimeTicks& delayed_work_time) {
// We know that we can't be blocked right now since this method can only be
// called on the same thread as Run, so we only need to update our record of
// how long to sleep when we do sleep.