Commit 9afcd7cf authored by Bernhard Link's avatar Bernhard Link

zero-pad fractial timestamp part (thanks to Andy Isaacson for noticing this)

parent 89ad825d
2009-08-10
* zero-pad fractial timestamp part
2009-07-02
* print raw data of unsupported or unknown requests and of
unexpected replies.
......
......@@ -51,12 +51,12 @@ static void startline(struct connection *c, enum package_direction d, const char
if( (print_timestamps || print_reltimestamps)
&& gettimeofday(&tv, NULL) == 0 ) {
if( print_timestamps )
fprintf(out, "%lu.%3u ", (unsigned long)tv.tv_sec,
fprintf(out, "%lu.%03u ", (unsigned long)tv.tv_sec,
(unsigned int)(tv.tv_usec/1000));
if( print_reltimestamps ) {
unsigned long long tt = ((unsigned long long)1000)*tv.tv_sec +
(tv.tv_usec/1000);
fprintf(out, "%lu.%3u ",
fprintf(out, "%lu.%03u ",
(unsigned long)((tt - c->starttime)/1000),
(unsigned int)((tt - c->starttime)%1000));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment