diff options
Diffstat (limited to 'usr/src/cmd/sgs/libld/common/debug.c')
-rw-r--r-- | usr/src/cmd/sgs/libld/common/debug.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/usr/src/cmd/sgs/libld/common/debug.c b/usr/src/cmd/sgs/libld/common/debug.c index 4ffa5ef19f..127a921987 100644 --- a/usr/src/cmd/sgs/libld/common/debug.c +++ b/usr/src/cmd/sgs/libld/common/debug.c @@ -30,6 +30,7 @@ #include <strings.h> #include <dlfcn.h> #include <debug.h> +#include <conv.h> #include "msg.h" /* @@ -205,6 +206,22 @@ dbg_print(Lm_list *lml, const char *format, ...) } else (void) fputs(MSG_INTL(MSG_DBG_DFLT_FMT), dbg_ofile.fptr); + if (DBG_ISTIME()) { + Conv_time_buf_t buf; + struct timeval new; + + if (gettimeofday(&new, NULL) == 0) { + if (DBG_ISTTIME()) + (void) fputs(conv_time(&DBG_TOTALTIME, &new, + &buf), stderr); + if (DBG_ISDTIME()) + (void) fputs(conv_time(&DBG_DELTATIME, &new, + &buf), stderr); + + DBG_DELTATIME = new; + } + } + va_start(args, format); (void) vfprintf(dbg_ofile.fptr, format, args); (void) fprintf(dbg_ofile.fptr, MSG_ORIG(MSG_STR_NL)); |