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

Unified Diff: cc/scheduler/delay_based_time_source.h

Issue 27710005: cc: Use HighResNow as timebase if it is fast and reliable (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix DCHECK Created 7 years, 2 months 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 | « cc/resources/resource_update_controller.cc ('k') | cc/scheduler/delay_based_time_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/delay_based_time_source.h
diff --git a/cc/scheduler/delay_based_time_source.h b/cc/scheduler/delay_based_time_source.h
index 55aac5a97fb5b0ae930aa56ccf80568a8e7248f7..ddb89da3566e19c5ad23dced1a1abcf6e73f019e 100644
--- a/cc/scheduler/delay_based_time_source.h
+++ b/cc/scheduler/delay_based_time_source.h
@@ -15,7 +15,7 @@ namespace cc {
// This timer implements a time source that achieves the specified interval
// in face of millisecond-precision delayed callbacks and random queueing
-// delays.
+// delays. DelayBasedTimeSource uses base::TimeTicks::Now as its timebase.
class CC_EXPORT DelayBasedTimeSource : public TimeSource {
public:
static scoped_refptr<DelayBasedTimeSource> Create(
@@ -73,6 +73,23 @@ class CC_EXPORT DelayBasedTimeSource : public TimeSource {
DISALLOW_COPY_AND_ASSIGN(DelayBasedTimeSource);
};
+// DelayBasedTimeSource uses base::TimeTicks::HighResNow as its timebase.
+class DelayBasedTimeSourceHighRes : public DelayBasedTimeSource {
+ public:
+ static scoped_refptr<DelayBasedTimeSourceHighRes> Create(
+ base::TimeDelta interval, base::SingleThreadTaskRunner* task_runner);
+
+ virtual base::TimeTicks Now() const OVERRIDE;
+
+ protected:
+ DelayBasedTimeSourceHighRes(base::TimeDelta interval,
+ base::SingleThreadTaskRunner* task_runner);
+ virtual ~DelayBasedTimeSourceHighRes();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(DelayBasedTimeSourceHighRes);
+};
+
} // namespace cc
#endif // CC_SCHEDULER_DELAY_BASED_TIME_SOURCE_H_
« no previous file with comments | « cc/resources/resource_update_controller.cc ('k') | cc/scheduler/delay_based_time_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698