Skip to content

Commit

Permalink
src: implement getting current time in NodePlatform
Browse files Browse the repository at this point in the history
It is required by a change in V8.
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/598666

PR-URL: #16271
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
  • Loading branch information
sdats authored and targos committed Dec 6, 2017
1 parent a7c5fe9 commit a1ed29b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/node_platform.cc
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ double NodePlatform::MonotonicallyIncreasingTime() {
return uv_hrtime() / 1e9;
}

double NodePlatform::CurrentClockTimeMillis() {
return SystemClockTimeMillis();
}

TracingController* NodePlatform::GetTracingController() {
return tracing_controller_.get();
}
Expand Down
1 change: 1 addition & 0 deletions src/node_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a1ed29b

Please sign in to comment.