diff options
author | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-06 22:23:29 +0000 |
---|---|---|
committer | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-06 22:23:29 +0000 |
commit | 7e7fab44ba1068bdce201757e82b6650fbca455d (patch) | |
tree | a25d1d1235e61672c95d66a7a287cc47f175799f /base/message_loop.h | |
parent | ffb65401dabf6ce5a74fcc416690b2525168ab8a (diff) | |
download | chromium_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_loop.h')
-rw-r--r-- | base/message_loop.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/base/message_loop.h b/base/message_loop.h index 9ac45ab..a5a94bc 100644 --- a/base/message_loop.h +++ b/base/message_loop.h @@ -341,10 +341,10 @@ class MessageLoop : public base::MessagePump::Delegate { // This structure is copied around by value. struct PendingTask { - Task* task; // The task to run. - base::Time delayed_run_time; // The time when the task should be run. - int sequence_num; // Used to facilitate sorting by run time. - bool nestable; // True if OK to dispatch from a nested loop. + Task* task; // The task to run. + base::TimeTicks delayed_run_time; // The time when the task should be run. + int sequence_num; // Secondary sort key for run time. + bool nestable; // OK to dispatch from a nested loop. PendingTask(Task* task, bool nestable) : task(task), sequence_num(0), nestable(nestable) { @@ -429,7 +429,7 @@ class MessageLoop : public base::MessagePump::Delegate { // base::MessagePump::Delegate methods: virtual bool DoWork(); - virtual bool DoDelayedWork(base::Time* next_delayed_work_time); + virtual bool DoDelayedWork(base::TimeTicks* next_delayed_work_time); virtual bool DoIdleWork(); // Start recording histogram info about events and action IF it was enabled @@ -451,7 +451,7 @@ class MessageLoop : public base::MessagePump::Delegate { DelayedTaskQueue delayed_work_queue_; // A recent snapshot of Time::Now(), used to check delayed_work_queue_. - base::Time recent_time_; + base::TimeTicks recent_time_; // A queue of non-nestable tasks that we had to defer because when it came // time to execute them we were in a nested message loop. They will execute |