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: nodejs#16271
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
  • Loading branch information
sdats authored and blattersturm committed Nov 2, 2018
1 parent 49831f9 commit 3f753ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions src/node_platform.cc
Original file line number Diff line number Diff line change
Expand Up @@ -284,11 +284,7 @@ double NodePlatform::MonotonicallyIncreasingTime() {
}

double NodePlatform::CurrentClockTimeMillis() {
#ifndef _WIN32
return v8::base::OS::TimeCurrentMillis();
#else
return 0.0;
#endif
return SystemClockTimeMillis();
}

TracingController* NodePlatform::GetTracingController() {
Expand Down
2 changes: 1 addition & 1 deletion src/node_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class NodePlatform : public MultiIsolatePlatform {
double delay_in_seconds) override;
bool IdleTasksEnabled(v8::Isolate* isolate) override;
double MonotonicallyIncreasingTime() override;
double CurrentClockTimeMillis();
double CurrentClockTimeMillis() override;
v8::TracingController* GetTracingController() override;

void FlushForegroundTasks(v8::Isolate* isolate);
Expand Down

0 comments on commit 3f753ca

Please sign in to comment.