diff options
author | darin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-20 01:13:40 +0000 |
---|---|---|
committer | darin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-20 01:13:40 +0000 |
commit | 3816f46725f7b8e42e352a063efd5206a46dbe9a (patch) | |
tree | d64edfcf741dcd927ce404f66dab723e8a0914c8 /base/timer.h | |
parent | bda05798c0609582075a3b872c37ad56021920c4 (diff) | |
download | chromium_src-3816f46725f7b8e42e352a063efd5206a46dbe9a.zip chromium_src-3816f46725f7b8e42e352a063efd5206a46dbe9a.tar.gz chromium_src-3816f46725f7b8e42e352a063efd5206a46dbe9a.tar.bz2 |
rollback r1075 to see if it helps resolve test failures
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1078 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/timer.h')
-rw-r--r-- | base/timer.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/base/timer.h b/base/timer.h index 74fe27b..c23f725 100644 --- a/base/timer.h +++ b/base/timer.h @@ -59,6 +59,9 @@ class Timer { Task* task() const { return task_; } void set_task(Task* task) { task_ = task; } + // Returns the time in msec relative to now that the timer should fire. + int GetCurrentDelay() const; + // Returns the absolute time at which the timer should fire. const Time &fire_time() const { return fire_time_; } @@ -174,10 +177,9 @@ class TimerManager { // Returns true if it runs a task, false otherwise. bool RunSomePendingTimers(); - // The absolute time at which the next timer is to fire. If there is not a - // next timer to run, then the is_null property of the returned Time object - // will be true. NOTE: This could be a time in the past! - Time GetNextFireTime() const; + // The number of milliseconds remaining until the pending timer (top of the + // pqueue) needs to be fired. Returns -1 if no timers are pending. + int GetCurrentDelay(); #ifdef UNIT_TEST // For testing only, used to simulate broken early-firing WM_TIMER |