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

Re: I need to use a wait



>Traffic generators, for example, the exponential one in expoo.cc, do
>similar things. Perhaps you want to look at them as an example. 

Thanks Haobo, this is a good source of examples.

Another part of the answer is you can't just block or wait---ns is not
multithreaded, so waiting (say, in a busy loop) would block the whole
simulator.  You need to schedule a timer to call you back at some time
in the future.

   -John Heidemann

>On Tue, 22 Feb 2000, Iyad Rahwan wrote:
>
>> Hi,
>> 
>> I need to be able to have a "wait" period inside a function with a specified period.
>> 
>> I am developing my own agent, and I need to have random idle periods between packets in a certain way. Using the resched() function of the timer is not enough. I still need to be able to make a "wait" inside my code.