src: implement getting current time in NodePlatform

It is required by a change in V8.
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/598666

PR-URL: https://github.com/nodejs/node/pull/16271
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
This commit is contained in:
Sergei Datsenko 2017-08-30 10:46:24 +10:00 committed by Michaël Zasso
parent a7c5fe9ba6
commit a1ed29b1c6
2 changed files with 5 additions and 0 deletions

View File

@ -279,6 +279,10 @@ double NodePlatform::MonotonicallyIncreasingTime() {
return uv_hrtime() / 1e9;
}
double NodePlatform::CurrentClockTimeMillis() {
return SystemClockTimeMillis();
}
TracingController* NodePlatform::GetTracingController() {
return tracing_controller_.get();
}

View File

@ -127,6 +127,7 @@ class NodePlatform : public MultiIsolatePlatform {
double delay_in_seconds) override;
bool IdleTasksEnabled(v8::Isolate* isolate) override;
double MonotonicallyIncreasingTime() override;
double CurrentClockTimeMillis() override;
v8::TracingController* GetTracingController() override;
void FlushForegroundTasks(v8::Isolate* isolate);