Bug 257

Summary: log time printer, can we optionally support output of time in seconds?
Product: ns-3 Reporter: Gustavo J. A. M. Carneiro <gjcarneiro>
Component: coreAssignee: Mathieu Lacage <mathieu.lacage>
Status: RESOLVED FIXED    
Severity: enhancement CC: craigdo, ns-bugs, tomh
Priority: P1    
Version: pre-release   
Hardware: All   
OS: All   
Attachments: proposed patch

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