diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/log.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/utils/log.c b/utils/log.c index 45cc2100f..eb7bb9a7d 100644 --- a/utils/log.c +++ b/utils/log.c @@ -19,6 +19,7 @@ #include <stdarg.h> #include <stdio.h> +#include <kos32sys.h> #include "utils/config.h" #include "utils/nsoption.h" #include "utils/sys_time.h" @@ -71,21 +72,8 @@ timeval_subtract(struct timeval *result, struct timeval *x, struct timeval *y) */ static const char *nslog_gettime(void) { - static struct timeval start_tv; static char buff[32]; - - struct timeval tv; - struct timeval now_tv; - - if (!timerisset(&start_tv)) { - gettimeofday(&start_tv, NULL); - } - gettimeofday(&now_tv, NULL); - - timeval_subtract(&tv, &now_tv, &start_tv); - - snprintf(buff, sizeof(buff),"(%ld.%06ld)", - (long)tv.tv_sec, (long)tv.tv_usec); + snprintf(buff, sizeof(buff),"(%u)", get_tick_count()); return buff; } |