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

A clock problem



Hi all,

I am using ns-2.1b2. I wrote an agent that send packets based on a trace
file and receives packets. In addition, I have added a field in the
packet common header that gets the time value at which a packet is
generated.
When a packet is received by the receiver, the receiver determines the
time value by calling Scheduler::instance().clock() and then computes
the delay by substracting the packet origination time carried in the
packet header from the time of reception value. For some reason, I get
somes time a negative delay. In other words, the time value that I am
getting at the receiver upon packet reception is smaller than the time
value at which the packet is generated! Has anybody encountered a
similar problem? Any clue as to what may be going on?


Thanks,
Nabil Bitar.