Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1203)

Unified Diff: base/timer/timer.h

Issue 2557663002: GetTimeToCallback() returns estimated time to callback. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/timer/timer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/timer/timer.h
diff --git a/base/timer/timer.h b/base/timer/timer.h
index 50aedbd4cec28e97c408b2acd8b896c70526732c..64b340a64bc5cef63bc5430c6a0f097bac65fce0 100644
--- a/base/timer/timer.h
+++ b/base/timer/timer.h
@@ -100,6 +100,11 @@ class BASE_EXPORT Timer {
// Returns the current delay for this timer.
virtual TimeDelta GetCurrentDelay() const;
+ // Returns an estimated time to the timer calling the user_task_ back. If
Mark Mentovai 2016/12/06 18:01:16 Two spaces between “calling” and “the” should only
The one and only Dr. Crash 2016/12/06 20:04:38 Can it return a negative TimeDelta? If the timer i
Mark Mentovai 2016/12/06 20:09:53 If things get jammed up and the callback should ha
+ // the timer is not running or if user_task_ is not set, return
+ // TimeDelta::Max().
+ virtual TimeDelta GetTimeToCallback() const;
Mark Mentovai 2016/12/06 18:01:16 No point in making this virtual if nobody override
The one and only Dr. Crash 2016/12/06 20:04:38 Ok. As far as I could tell, other virtual function
+
// Set the task runner on which the task should be scheduled. This method can
// only be called before any tasks have been scheduled. The task runner must
// run tasks on the same thread the timer is used on.
« no previous file with comments | « no previous file | base/timer/timer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698