summaryrefslogtreecommitdiffstats
path: root/base/message_pump_default.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_default.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_default.cc')
-rw-r--r--base/message_pump_default.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/base/message_pump_default.cc b/base/message_pump_default.cc
index 518684a..d9eddc4 100644
--- a/base/message_pump_default.cc
+++ b/base/message_pump_default.cc
@@ -41,13 +41,13 @@ void MessagePumpDefault::Run(Delegate* delegate) {
if (delayed_work_time_.is_null()) {
event_.Wait();
} else {
- TimeDelta delay = delayed_work_time_ - Time::Now();
+ TimeDelta delay = delayed_work_time_ - TimeTicks::Now();
if (delay > TimeDelta()) {
event_.TimedWait(delay);
} else {
// It looks like delayed_work_time_ indicates a time in the past, so we
// need to call DoDelayedWork now.
- delayed_work_time_ = Time();
+ delayed_work_time_ = TimeTicks();
}
}
// Since event_ is auto-reset, we don't need to do anything special here
@@ -67,7 +67,8 @@ void MessagePumpDefault::ScheduleWork() {
event_.Signal();
}
-void MessagePumpDefault::ScheduleDelayedWork(const Time& delayed_work_time) {
+void MessagePumpDefault::ScheduleDelayedWork(
+ const TimeTicks& delayed_work_time) {
// We know that we can't be blocked on Wait 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.