Skip to content

Commit a1ed29b

Browse files
sdatstargos
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: #16271 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Myles Borins <myles.borins@gmail.com>
1 parent a7c5fe9 commit a1ed29b

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/node_platform.cc

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

282+
double NodePlatform::CurrentClockTimeMillis() {
283+
return SystemClockTimeMillis();
284+
}
285+
282286
TracingController* NodePlatform::GetTracingController() {
283287
return tracing_controller_.get();
284288
}

src/node_platform.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ class NodePlatform : public MultiIsolatePlatform {
127127
double delay_in_seconds) override;
128128
bool IdleTasksEnabled(v8::Isolate* isolate) override;
129129
double MonotonicallyIncreasingTime() override;
130+
double CurrentClockTimeMillis() override;
130131
v8::TracingController* GetTracingController() override;
131132

132133
void FlushForegroundTasks(v8::Isolate* isolate);

0 commit comments

Comments
 (0)