Skip to content

Commit 3f753ca

Browse files
sdatsblattersturm
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#16271 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Myles Borins <[email protected]>
1 parent 49831f9 commit 3f753ca

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/node_platform.cc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,7 @@ double NodePlatform::MonotonicallyIncreasingTime() {
284284
}
285285

286286
double NodePlatform::CurrentClockTimeMillis() {
287-
#ifndef _WIN32
288-
return v8::base::OS::TimeCurrentMillis();
289-
#else
290-
return 0.0;
291-
#endif
287+
return SystemClockTimeMillis();
292288
}
293289

294290
TracingController* NodePlatform::GetTracingController() {

src/node_platform.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +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();
130+
double CurrentClockTimeMillis() override;
131131
v8::TracingController* GetTracingController() override;
132132

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

0 commit comments

Comments
 (0)