Replaced all instances of localtime with localtime_r
This commit is contained in:
parent
b6f0b596b2
commit
8c2360fd56
3 changed files with 6 additions and 3 deletions
|
@ -310,9 +310,10 @@ namespace Util{
|
|||
}
|
||||
time_t rawtime;
|
||||
struct tm *timeinfo;
|
||||
struct tm timetmp;
|
||||
char buffer[100];
|
||||
time(&rawtime);
|
||||
timeinfo = localtime(&rawtime);
|
||||
timeinfo = localtime_r(&rawtime, &timetmp);
|
||||
strftime(buffer, 100, "%F %H:%M:%S", timeinfo);
|
||||
dprintf(out, "%s[%s] ", color_time, buffer);
|
||||
if (progname && progpid && strlen(progname) && strlen(progpid)){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue