summaryrefslogtreecommitdiff
path: root/src/node_report.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/node_report.cc')
-rw-r--r--src/node_report.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/node_report.cc b/src/node_report.cc
index 74391cd4c1..8a257b0c9c 100644
--- a/src/node_report.cc
+++ b/src/node_report.cc
@@ -209,11 +209,14 @@ static void WriteNodeReport(Isolate* isolate,
tm_struct.tm_min,
tm_struct.tm_sec);
writer.json_keyvalue("dumpEventTime", timebuf);
- struct timeval ts;
- gettimeofday(&ts, nullptr);
- writer.json_keyvalue("dumpEventTimeStamp",
- std::to_string(ts.tv_sec * 1000 + ts.tv_usec / 1000));
#endif
+
+ uv_timeval64_t ts;
+ if (uv_gettimeofday(&ts) == 0) {
+ writer.json_keyvalue("dumpEventTimeStamp",
+ std::to_string(ts.tv_sec * 1000 + ts.tv_usec / 1000));
+ }
+
// Report native process ID
writer.json_keyvalue("processId", pid);