summaryrefslogtreecommitdiffstats
path: root/base/timer.h
diff options
context:
space:
mode:
authordarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-20 00:25:57 +0000
committerdarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-20 00:25:57 +0000
commit1a2bfdd793e88a64f78b38d23303550cfd0703eb (patch)
tree90ef0670a00f72c3e0cc2499866d5627511a4867 /base/timer.h
parent7759c9a7b587662988fa1357c17c273ee64fb3bd (diff)
downloadchromium_src-1a2bfdd793e88a64f78b38d23303550cfd0703eb.zip
chromium_src-1a2bfdd793e88a64f78b38d23303550cfd0703eb.tar.gz
chromium_src-1a2bfdd793e88a64f78b38d23303550cfd0703eb.tar.bz2
Eliminate TimerManager::GetCurrentDelay in favor of always referring to the fire time of the next timer. I changed the MessagePump API to refer to a delayed_work_time instead of a delay.
I moved the ceil-based rounding code into the Window's implementations of WaitableEvent and MessagePump. R=jar git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1075 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/timer.h')
-rw-r--r--base/timer.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/base/timer.h b/base/timer.h
index c23f725..74fe27b 100644
--- a/base/timer.h
+++ b/base/timer.h
@@ -59,9 +59,6 @@ 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_; }
@@ -177,9 +174,10 @@ class TimerManager {
// Returns true if it runs a task, false otherwise.
bool RunSomePendingTimers();
- // 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();
+ // 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;
#ifdef UNIT_TEST
// For testing only, used to simulate broken early-firing WM_TIMER