| 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..5763817588e9e9bd9082418e5c2764b648b0d54b 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
|
| + // whether or not the WebTaskRunner is associated with a virtual time domain or a
|
| + // 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 WebTaskRunner is associated with a virtual time domain or a
|
| + // real time domain.
|
| + virtual double monotonicallyIncreasingVirtualTimeSeconds() const = 0;
|
| +
|
| #ifdef INSIDE_BLINK
|
| // Helpers for posting bound functions as tasks.
|
| typedef Function<void()> ClosureTask;
|
|
|