diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index 15d58d7c31..6e2043cb07 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -517,14 +517,14 @@ fatal(const char *format, ...) { void debug(const char *format, ...) { va_list args; + isc_time_t t; if (debugging) { fflush(stdout); if (debugtiming) { - struct timeval tv; - (void)gettimeofday(&tv, NULL); - fprintf(stderr, "%ld.%06ld: ", (long)tv.tv_sec, - (long)tv.tv_usec); + TIME_NOW(&t); + fprintf(stderr, "%d.%06d: ", + t.seconds, t.nanoseconds / 1000); } va_start(args, format); vfprintf(stderr, format, args);