Skip to content

Commit 311ec12

Browse files
alexkozytargos
authored andcommitted
inspector: fixed V8InspectorClient::currentTimeMS
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 <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Jon Moss <[email protected]>
1 parent 76a6592 commit 311ec12

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/inspector_agent.cc

+1-3
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,6 @@ static int StartDebugSignalHandler() {
187187
#endif // _WIN32
188188

189189

190-
// Used in NodeInspectorClient::currentTimeMS() below.
191-
const int NANOS_PER_MSEC = 1000000;
192190
const int CONTEXT_GROUP_ID = 1;
193191

194192
class ChannelImpl final : public v8_inspector::V8Inspector::Channel,
@@ -593,7 +591,7 @@ class NodeInspectorClient : public V8InspectorClient {
593591
}
594592

595593
double currentTimeMS() override {
596-
return uv_hrtime() * 1.0 / NANOS_PER_MSEC;
594+
return env_->isolate_data()->platform()->CurrentClockTimeMillis();
597595
}
598596

599597
node::Environment* env_;

0 commit comments

Comments
 (0)