diff --git a/starboard/BUILD.gn b/starboard/BUILD.gn index cefe158bb809..aa50544c013f 100644 --- a/starboard/BUILD.gn +++ b/starboard/BUILD.gn @@ -22,7 +22,6 @@ group("gn_all") { deps = [ ":default", "//starboard/client_porting/cwrappers:cwrappers_test", - "//starboard/client_porting/eztime", "//starboard/client_porting/eztime:eztime_test", "//starboard/client_porting/icu_init", "//starboard/examples/glclear:starboard_glclear_example", diff --git a/starboard/build/config/starboard_target_type.gni b/starboard/build/config/starboard_target_type.gni index e77b85227f42..68b9d274b562 100644 --- a/starboard/build/config/starboard_target_type.gni +++ b/starboard/build/config/starboard_target_type.gni @@ -45,7 +45,6 @@ template("starboard_platform_target") { } public_deps = [ "//starboard/client_porting/cwrappers", - "//starboard/client_porting/eztime", "//starboard/common", "//starboard/egl_and_gles", ] diff --git a/starboard/common/log.cc b/starboard/common/log.cc index 1a4e0b10335a..9da18ec9d400 100644 --- a/starboard/common/log.cc +++ b/starboard/common/log.cc @@ -15,13 +15,14 @@ #include "starboard/common/log.h" #include +#include +#include #include #include #include #include -#include "starboard/client_porting/eztime/eztime.h" #include "starboard/common/string.h" #include "starboard/system.h" #include "starboard/thread.h" @@ -171,17 +172,15 @@ void LogMessage::Init(const char* file, int line) { pthread_getname_np(pthread_self(), name, SB_ARRAY_SIZE_INT(name)); stream_ << '['; stream_ << name << '/' << pthread_self() << ':'; - EzTimeValue time_value; - EzTimeValueGetNow(&time_value, NULL); - EzTimeT t = time_value.tv_sec; - struct EzTimeExploded local_time = {0}; - EzTimeTExplodeLocal(&t, &local_time); - struct EzTimeExploded* tm_time = &local_time; - stream_ << std::setfill('0') << std::setw(2) << 1 + tm_time->tm_mon - << std::setw(2) << tm_time->tm_mday << '/' << std::setw(2) - << tm_time->tm_hour << std::setw(2) << tm_time->tm_min << std::setw(2) - << tm_time->tm_sec << '.' << std::setw(6) << time_value.tv_usec - << ':'; + struct timeval tv; + gettimeofday(&tv, NULL); + struct tm tm_time = {0}; + time_t t = static_cast(tv.tv_sec); + gmtime_r(&t, &tm_time); + stream_ << std::setfill('0') << std::setw(2) << 1 + tm_time.tm_mon + << std::setw(2) << tm_time.tm_mday << '/' << std::setw(2) + << tm_time.tm_hour << std::setw(2) << tm_time.tm_min << std::setw(2) + << tm_time.tm_sec << '.' << std::setw(6) << tv.tv_usec << "(UTC):"; stream_ << log_priority_names[priority_]; stream_ << ":" << filename << "(" << line << ")] "; message_start_ = stream_.tellp();