[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [ns] Timer resolution




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?

Mark

-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of
Haobo Yu
Sent: Saturday, February 03, 2001 6:29 AM
To: Mark Janssen
Cc: [email protected]
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
on
> 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
handled
> I would be very thankful.
>
> Regards,
>
> Mark Janssen
>
> ------------
> Mark Janssen
> Institute of Computational Physics
> Room MG307
> Telephone 030-2537724
>
>
>