aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-05-25 12:29:09 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-05-25 12:29:09 +0000
commitcf2e365f23b5e11dd8622fc80a119cfc76110514 (patch)
treec5c250c13146a978064ccfbfe693b75603ed3db0
parent72e532cb67985f2be7718b0a49f35189503c76df (diff)
output the full usec when --trace-time is used
-rw-r--r--src/main.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index f5e4e1775..608b86afe 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2817,16 +2817,15 @@ int my_trace(CURL *handle, curl_infotype type,
const char *text;
struct timeval tv;
struct tm *now;
- char timebuf[15];
+ char timebuf[20];
(void)handle; /* prevent compiler warning */
tv = curlx_tvnow();
now = localtime(&tv.tv_sec); /* not multithread safe but we don't care */
if(config->tracetime)
- snprintf(timebuf, sizeof(timebuf), "%02d:%02d:%02d.%02d ",
- now->tm_hour, now->tm_min, now->tm_sec,
- tv.tv_usec/10000);
+ snprintf(timebuf, sizeof(timebuf), "%02d:%02d:%02d.%06d ",
+ now->tm_hour, now->tm_min, now->tm_sec, tv.tv_usec);
else
timebuf[0]=0;