Bug 257 - log time printer, can we optionally support output of time in seconds?
log time printer, can we optionally support output of time in seconds?
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: core
pre-release
All All
: P1 enhancement
Assigned To: Mathieu Lacage
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-24 10:12 EDT by Gustavo J. A. M. Carneiro
Modified: 2008-11-25 09:38 EST (History)
3 users (show)

See Also:


Attachments
proposed patch (3.14 KB, patch)
2008-10-20 08:04 EDT, Mathieu Lacage
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo J. A. M. Carneiro 2008-07-24 10:12:45 EDT
Currently log time is printed in nanoseconds, which is very hard to read.  Would be much better if we could have an option to print time in seconds.
Comment 1 Mathieu Lacage 2008-10-20 08:04:39 EDT
Created attachment 274 [details]
proposed patch

is this something you would be happy with ?

I would even be fine with changing the default from PREFIX_TIME to PREFIX_TIME_S
Comment 2 Gustavo J. A. M. Carneiro 2008-10-20 11:57:21 EDT
+1
Comment 3 Pedro Fortuna 2008-10-20 11:58:45 EDT
The patch looks fine to me. One vote for changing the default from PREFIX_TIME to
PREFIX_TIME_S.
Comment 4 Tom Henderson 2008-11-12 00:51:18 EST
+1, I guess that this patch is needed to enable the output Gustavo posted for bug 405.  +1 on changing the default to be seconds-based.
Comment 5 Mathieu Lacage 2008-11-12 01:45:58 EST
(In reply to comment #4)
> +1, I guess that this patch is needed to enable the output Gustavo posted for
> bug 405.  +1 on changing the default to be seconds-based.

Since it looks like everyone would be happy with changing the default, how about just doing this and getting rid of the ns output ?

Comment 6 Gustavo J. A. M. Carneiro 2008-11-12 05:57:57 EST
The output in seconds from bug 405 is actually not a result of this patch but a quick and dirty patch I have done in my tree.  But the result should be more or less the same...

+1 to change the default to seconds.  But then you should change the patch to add PREFIX_TIME_NS instead of PREFIX_TIME_S.  I guessing there was a reason to have time in nanoseconds in the first place.  I am guessing the reason still remains, although we have come to the conclusion that in most cases time in seconds is what we want and time in nanoseconds is the exception and not the rule.
Comment 7 Tom Henderson 2008-11-17 17:39:40 EST
(In reply to comment #6)
> The output in seconds from bug 405 is actually not a result of this patch but a
> quick and dirty patch I have done in my tree.  But the result should be more or
> less the same...
> 
> +1 to change the default to seconds.  But then you should change the patch to
> add PREFIX_TIME_NS instead of PREFIX_TIME_S.  I guessing there was a reason to
> have time in nanoseconds in the first place.  I am guessing the reason still
> remains, although we have come to the conclusion that in most cases time in
> seconds is what we want and time in nanoseconds is the exception and not the
> rule.
> 

I would be happy with either removing the ns variant or just making it non-default.
Comment 8 Mathieu Lacage 2008-11-25 09:38:33 EST
changed the default to output seconds.
changeset: 736b807ae8c0