diff options
Diffstat (limited to 'utils/log.h')
-rw-r--r-- | utils/log.h | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/utils/log.h b/utils/log.h index cfee359f4..b676c65bf 100644 --- a/utils/log.h +++ b/utils/log.h @@ -21,22 +21,13 @@ #define _NETSURF_LOG_H_ #include <stdio.h> -#include <sys/time.h> #include "desktop/netsurf.h" #ifdef NDEBUG # define LOG(x) ((void) 0) #else -static inline const char *nslog_gettime(void) -{ - static char buff[32]; - static struct timeval tv; - - gettimeofday(&tv, NULL); - snprintf(buff, sizeof(buff),"(%ld.%ld)", tv.tv_sec, tv.tv_usec); - return buff; -} +extern const char *nslog_gettime(void); # ifdef __GNUC__ # define LOG(x) do { if (verbose_log) (printf("%s " __FILE__ " %s %i: ", nslog_gettime(), __PRETTY_FUNCTION__, __LINE__), printf x, fputc('\n', stdout)); } while (0) |