Index: third_party/WebKit/public/platform/WebTaskRunner.h |
diff --git a/third_party/WebKit/public/platform/WebTaskRunner.h b/third_party/WebKit/public/platform/WebTaskRunner.h |
index defe4a1aedac05b2ce2dd8c4850f1455b2b3bb8d..1f714262ba1a666a8fae60bab981596703bd0830 100644 |
--- a/third_party/WebKit/public/platform/WebTaskRunner.h |
+++ b/third_party/WebKit/public/platform/WebTaskRunner.h |
@@ -37,6 +37,24 @@ public: |
// Returns a clone of the WebTaskRunner. |
virtual WebTaskRunner* clone() = 0; |
+ // --- |
+ |
+ // Headless Chrome virtualises time for determinism and performance (fast forwarding |
+ // of timers). To make this work some parts of blink (e.g. Timers) need to use virtual |
+ // time, however by default new code should use the normal non-virtual time APIs. |
+ |
+ // Returns a double which is the number of seconds since epoch (Jan 1, 1970). |
+ // This may represent either the real time, or a virtual time depending on |
Sami
2016/02/09 21:00:28
These two functions no longer depend on whether we
alex clarke (OOO till 29th)
2016/02/10 14:58:07
Done.
|
+ // whether or not the system is currently running a task associated with a |
+ // virtual time domain or real time domain. |
+ virtual double virtualTimeSeconds() const = 0; |
+ |
+ // Returns a microsecond resolution platform dependant time source. |
+ // This may represent either the real time, or a virtual time depending on |
+ // whether or not the system is currently running a task associated with a |
+ // virtual time domain or real time domain. |
+ virtual double monotonicallyIncreasingVirtualTimeSeconds() const = 0; |
+ |
#ifdef INSIDE_BLINK |
// Helpers for posting bound functions as tasks. |
typedef Function<void()> ClosureTask; |