From 7e2fa03804bef4bff9c5bb941f2edf09b6d234c0 Mon Sep 17 00:00:00 2001 From: "darin@chromium.org" Date: Thu, 25 Sep 2008 21:35:10 +0000 Subject: 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 --- base/timer.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'base/timer.h') 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) {} -- cgit v1.1