Skip to content

Commit

Permalink
inspector: fixed V8InspectorClient::currentTimeMS
Browse files Browse the repository at this point in the history
On inspector side inside V8 we assume that this method should
return number of ms since epoch.

PR-URL: #21917
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
  • Loading branch information
alexkozy authored and targos committed Aug 2, 2018
1 parent 76a6592 commit 311ec12
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/inspector_agent.cc
Expand Up @@ -187,8 +187,6 @@ static int StartDebugSignalHandler() {
#endif // _WIN32


// Used in NodeInspectorClient::currentTimeMS() below.
const int NANOS_PER_MSEC = 1000000;
const int CONTEXT_GROUP_ID = 1;

class ChannelImpl final : public v8_inspector::V8Inspector::Channel,
Expand Down Expand Up @@ -593,7 +591,7 @@ class NodeInspectorClient : public V8InspectorClient {
}

double currentTimeMS() override {
return uv_hrtime() * 1.0 / NANOS_PER_MSEC;
return env_->isolate_data()->platform()->CurrentClockTimeMillis();
}

node::Environment* env_;
Expand Down

0 comments on commit 311ec12

Please sign in to comment.