use data race safe gmtime variant as in NormSession::OnReportTimeout
parent
006f9d29aa
commit
03d1de9813
|
|
@ -2628,7 +2628,14 @@ void NormTrace(const struct timeval ¤tTime,
|
||||||
struct tm *ct = &timeStruct;
|
struct tm *ct = &timeStruct;
|
||||||
#else
|
#else
|
||||||
time_t secs = (time_t)currentTime.tv_sec;
|
time_t secs = (time_t)currentTime.tv_sec;
|
||||||
struct tm *ct = gmtime(&secs);
|
struct tm timeStruct;
|
||||||
|
#ifdef WIN32
|
||||||
|
gmtime_s(&timeStruct, &secs);
|
||||||
|
struct tm *ct = &timeStruct;
|
||||||
|
#else
|
||||||
|
struct tm *ct = gmtime_r(&secs, &timeStruct);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // if/else _WIN32_WCE
|
#endif // if/else _WIN32_WCE
|
||||||
|
|
||||||
PLOG(PL_ALWAYS, "trace>%02d:%02d:%02d.%06lu ",
|
PLOG(PL_ALWAYS, "trace>%02d:%02d:%02d.%06lu ",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue