Skip to content
This repository has been archived by the owner on May 31, 2019. It is now read-only.

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: nodejs/node#16271
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
(cherry picked from commit a1ed29b)
  • Loading branch information
sdats authored and hferreiro committed Feb 12, 2018
1 parent 288448e commit 35edca8
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 @@ -138,6 +138,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 @@ -52,6 +52,7 @@ class NodePlatform : public v8::Platform {
double delay_in_seconds) override;
bool IdleTasksEnabled(v8::Isolate* isolate) override;
double MonotonicallyIncreasingTime() override;
double CurrentClockTimeMillis() override;
v8::TracingController* GetTracingController() override;

private:
Expand Down

0 comments on commit 35edca8

Please sign in to comment.