Add get current wall-clock time to the Platform
To avoid breaking Chromium we expose a stub method first, and will start using it only when V8 rolls into Chromium and we implement it there. Bug: chromium:751993 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: Ida1f96f2dfa833552e7adfa36a580a6ef1bdd1aa Reviewed-on: https://chromium-review.googlesource.com/604812 Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Commit-Queue: Sergei Datsenko <dats@chromium.org> Cr-Commit-Position: refs/heads/master@{#47233}
This commit is contained in:
parent
300c0d38e5
commit
b8d4ce2b99
@ -204,6 +204,16 @@ class Platform {
|
||||
* the epoch.
|
||||
**/
|
||||
virtual double MonotonicallyIncreasingTime() = 0;
|
||||
|
||||
/**
|
||||
* Current wall-clock time in milliseconds since epoch.
|
||||
* This function is expected to return at least millisecond-precision values.
|
||||
*/
|
||||
virtual double CurrentClockTimeMillis() {
|
||||
// TODO(dats): Make pure virtual after V8 roll in Chromium.
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
typedef void (*StackTracePrinter)();
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user