summaryrefslogtreecommitdiffstats
path: root/base/timer.h
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-25 21:35:10 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-25 21:35:10 +0000
commit7e2fa03804bef4bff9c5bb941f2edf09b6d234c0 (patch)
tree535d81a14867f7b037bec19764bfaa56a53acd33 /base/timer.h
parent5f715e9411a0b4b8e207072fdbfad5160f5ad1e2 (diff)
downloadchromium_src-7e2fa03804bef4bff9c5bb941f2edf09b6d234c0.zip
chromium_src-7e2fa03804bef4bff9c5bb941f2edf09b6d234c0.tar.gz
chromium_src-7e2fa03804bef4bff9c5bb941f2edf09b6d234c0.tar.bz2
Stop spamming delayed tasks on each input event.
R=mbelshe BUG=2693 Review URL: http://codereview.chromium.org/4262 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2609 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/timer.h')
-rw-r--r--base/timer.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/base/timer.h b/base/timer.h
index 32adbf1..5361130 100644
--- a/base/timer.h
+++ b/base/timer.h
@@ -66,6 +66,13 @@ class BaseTimer_Helper {
return delayed_task_ != NULL;
}
+ // Returns the current delay for this timer. May only call this method when
+ // the timer is running!
+ TimeDelta GetCurrentDelay() const {
+ DCHECK(IsRunning());
+ return delayed_task_->delay_;
+ }
+
protected:
BaseTimer_Helper() : delayed_task_(NULL) {}