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

Unified Diff: base/message_pump_libevent.cc

Issue 3884001: Switch to using TimeTicks rather than Time in message loops (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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 | « base/message_pump_libevent.h ('k') | base/message_pump_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_pump_libevent.cc
===================================================================
--- base/message_pump_libevent.cc (revision 65315)
+++ base/message_pump_libevent.cc (working copy)
@@ -290,7 +290,7 @@
if (delayed_work_time_.is_null()) {
event_base_loop(event_base_, EVLOOP_ONCE);
} else {
- TimeDelta delay = delayed_work_time_ - Time::Now();
+ TimeDelta delay = delayed_work_time_ - TimeTicks::Now();
if (delay > TimeDelta()) {
struct timeval poll_tv;
poll_tv.tv_sec = delay.InSeconds();
@@ -303,7 +303,7 @@
} 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();
}
}
}
@@ -326,7 +326,8 @@
<< "[nwrite:" << nwrite << "] [errno:" << errno << "]";
}
-void MessagePumpLibevent::ScheduleDelayedWork(const Time& delayed_work_time) {
+void MessagePumpLibevent::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.
« no previous file with comments | « base/message_pump_libevent.h ('k') | base/message_pump_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698