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

Commit 536ef46

Browse files
sdatshferreiro
authored andcommitted
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: nodejs/node#16271 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Myles Borins <myles.borins@gmail.com> (cherry picked from commit a1ed29b)
1 parent 7c9eca7 commit 536ef46

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

‎src/node_platform.cc‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ double NodePlatform::MonotonicallyIncreasingTime() {
138138
return uv_hrtime() / 1e9;
139139
}
140140

141+
double NodePlatform::CurrentClockTimeMillis() {
142+
return SystemClockTimeMillis();
143+
}
144+
141145
TracingController* NodePlatform::GetTracingController() {
142146
return tracing_controller_.get();
143147
}

‎src/node_platform.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class NodePlatform : public v8::Platform {
5252
double delay_in_seconds) override;
5353
bool IdleTasksEnabled(v8::Isolate* isolate) override;
5454
double MonotonicallyIncreasingTime() override;
55+
double CurrentClockTimeMillis() override;
5556
v8::TracingController* GetTracingController() override;
5657

5758
private:

0 commit comments

Comments
 (0)