Browse Source

[HACK] Implement getting current time in NodePlatform

It's required by an upcoming change in V8:
https://chromium-review.googlesource.com/c/v8/v8/+/598666
canary-base
Sergei Datsenko 7 years ago
committed by Node.js Jenkins CI
parent
commit
c60ff01063
  1. 4
      src/node_platform.cc
  2. 1
      src/node_platform.h

4
src/node_platform.cc

@ -137,6 +137,10 @@ double NodePlatform::MonotonicallyIncreasingTime() {
return uv_hrtime() / 1e9;
}
double NodePlatform::CurrentClockTimeMillis() {
return SystemClockTimeMillis();
}
TracingController* NodePlatform::GetTracingController() {
return tracing_controller_.get();
}

1
src/node_platform.h

@ -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:

Loading…
Cancel
Save