[ns] delay in simulated network (aodv)

klpang dorth at singnet.com.sg
Sun Nov 21 13:17:25 PST 2004


hi all,

is there any way in ns2 to add a delay before the next line of code? 
not ns2 execution delay but simulated network.

code segment example,

 for(; nb; nb = nb->nb_link.le_next)
  {
   if((my_wint= wintable.wint_lookupSender(nb->nb_addr))==0 )
       notrecv[i++]= nb->nb_addr;
  
   }

//i want to add a 1.5 sec delay here, something like time out

  for(j=0; j<i; j++)
  {
 if((my_wint2= wintable.wint_lookupSender(notrecv[j]))==0 )
     printf("\nNode %d moves away", notrecv[j] );

  }

please advise, thanks

regards
klpang



More information about the Ns-users mailing list