log: quit using lrint and -lm
This commit is contained in:
parent
aca05c4f2e
commit
db96239982
@ -71,7 +71,6 @@ libcommon_la_SOURCES = \
|
||||
$(PIXMAN_SOURCES)
|
||||
|
||||
libcommon_la_LIBADD = \
|
||||
-lm \
|
||||
-lpthread \
|
||||
$(OPENSSL_LIBS) \
|
||||
$(DLOPEN_LIBS)
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <math.h>
|
||||
#include <syslog.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
@ -1158,7 +1157,7 @@ getFormattedDateTime(char *replybuf, int bufsize)
|
||||
gettimeofday(&tv, NULL);
|
||||
now = localtime(&tv.tv_sec);
|
||||
|
||||
millisec = lrint(tv.tv_usec / 1000.0);
|
||||
millisec = (tv.tv_usec + 500 / 1000);
|
||||
g_snprintf(buf_millisec, sizeof(buf_millisec), "%03d", millisec);
|
||||
|
||||
strftime(buf_datetime, sizeof(buf_datetime), "%FT%T.", now);
|
||||
|
Loading…
Reference in New Issue
Block a user