summaryrefslogtreecommitdiffstats
path: root/base/timer.h
diff options
context:
space:
mode:
authordarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-30 00:22:48 +0000
committerdarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-30 00:22:48 +0000
commit9bcbf478c173d91958cdabc8a8902619392b7f1f (patch)
treebad2b3022719370e6eb01a66f94924a1f848a968 /base/timer.h
parent3f9f500b82c82402d9eef92606ebd149762e9f0c (diff)
downloadchromium_src-9bcbf478c173d91958cdabc8a8902619392b7f1f.zip
chromium_src-9bcbf478c173d91958cdabc8a8902619392b7f1f.tar.gz
chromium_src-9bcbf478c173d91958cdabc8a8902619392b7f1f.tar.bz2
Switch SharedTimerWin over to using PostDelayedTask. I made some tweaks to the
PostDelayedTask implementation to ensure that perf is still good. This involved recording the intended fire time of PostDelayedTask on the Task object so that it can be used to properly determine the delay passed to the StartTimer call. With this change, I am able to service timers (call DoDelayedWork) more often from within the MessagePump implementations. R=mbelshe BUG=1346553 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1578 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/timer.h')
-rw-r--r--base/timer.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/base/timer.h b/base/timer.h
index add7844..d78423a 100644
--- a/base/timer.h
+++ b/base/timer.h
@@ -74,6 +74,9 @@ class Timer {
public:
Timer(int delay, Task* task, bool repeating);
+ // For one-shot timers, you can also specify the exact fire time.
+ Timer(Time fire_time, Task* task);
+
// The task to be run when the timer fires.
Task* task() const { return task_; }
void set_task(Task* task) { task_ = task; }