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

Re: [ns] Delays Sheduling?



You can do it easily in otcl, e.g.: 

Myagent instproc delay_send {} {
	$self instvar ns_
	$ns_ at [expr [$ns_ now]+1.0] "$self cmd send 128"
}

Or you can use a TimerHandler in C++. Please read ns manual and
timer-handler.{h,cc}

On Mon, 24 Apr 2000, Anis Koubaa wrote:

> Hi ns users ,
> I have made a new agent like the ping one.
> I want to introduce a  delay before sending the packet. The agent must
> wait for a while before sending the packet and this delay will be
> considered by the scheduler. How can I do This!!
> Thank you
> -- 
> --------------------------------------------------------------------------
>         Cordialement
>         
> Koubaa Anis 
> Organization : LORIA Nancy
> Equipe : RESEDAS
> Adresse : CU Haute Malgrange Vandeoeuvre Nancy Bloc C 528
> Mail : [email protected]
> Projet : Comparaison des Protocoles de cl�s de distribution de cl� de
> groupe en utilisant NS
> --------------------------------------------------------------------------
>