[ns] Timer resolution
Mon, 5 Feb 2001 13:21:35 -0800 (PST)
Did you look at TIME_FORMAT in your trace.cc? That controls how the
timestamps are actually printed in the trace files. I recall about a year
ago there was a problem with validation so we had to set low precision
(6 decimal digits) in printf(). This seems to match the symptom you are
On Sat, 3 Feb 2001, Mark Janssen wrote:
> That's what I hoped. However I run into a problem. I have changed the
> traffic generator which uses the binary data file as input.
> Instead of specifying the interpacket time in microseconds. I can now
> specify it in nanoseconds.
> However when I look at the tracefile, the packet times are rounded to six
> decimals. I have changed the PRECISION in trace.h/cc, but that doen't make a
> difference. How can I change the tracefile format in such a way that it puts
> the entire double float in the tracefile?
> -----Original Message-----
> From: owner-ns-users@ISI.EDU [mailto:owner-ns-users@ISI.EDU]On Behalf Of
> Haobo Yu
> Sent: Saturday, February 03, 2001 6:29 AM
> To: Mark Janssen
> Cc: ns-users@ISI.EDU
> Subject: Re: [ns] Timer resolution
> ns uses virtual time, its resolution is limited only the the resolution of
> double floating point. BUT, when using calendar scheduler, due to its
> bucket size constraint, the maximum time span of events scheudled might
> affect timer granularity. That is, if you ahve two events that're (for
> instance) 1 million seconds apart, then the scheduler will get into
> trouble if you schedule another two events that are 1 picosecond apart.
> - Haobo
> On Fri, 2 Feb 2001, Mark Janssen wrote:
> > I have a question regarding the timer resolution in NS. Am I correct in
> > assuming that the smallest resolution is 1 microsecond?
> > And is it possible to increase this resolution. I wuld loike to simulate
> > a nanosecond basis.
> > (Maybe similar to Ssf's Net-frequency)
> > If you could point me to the part of the source where the timing is
> > I would be very thankful.
> > Regards,
> > Mark Janssen
> > ------------
> > Mark Janssen
> > Institute of Computational Physics
> > Room MG307
> > Telephone 030-2537724