Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: prefer uv_gettimeofday over gettimeofday(2) #34689

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,9 @@ int WriteFileSync(const char* path, uv_buf_t buf) {
return err;
}

int WriteFileSync(v8::Isolate* isolate,
int WriteFileSync(Isolate* isolate,
const char* path,
v8::Local<v8::String> string) {
Local<String> string) {
node::Utf8Value utf8(isolate, string);
uv_buf_t buf = uv_buf_init(utf8.out(), utf8.length());
return WriteFileSync(path, buf);
Expand All @@ -222,8 +222,8 @@ void DiagnosticFilename::LocalTime(TIME_TYPE* tm_struct) {
#ifdef _WIN32
GetLocalTime(tm_struct);
#else // UNIX, OSX
struct timeval time_val;
gettimeofday(&time_val, nullptr);
uv_timeval64_t time_val;
CHECK_EQ(0, uv_gettimeofday(&time_val));
localtime_r(&time_val.tv_sec, tm_struct);
#endif
}
Expand Down