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

Re: [ns] timer...



sched() will only schedule an event for the first time. resched()
will deque the event (if it exists) from the scheduler queue and
then reschedule it with the new "delay". for new events both produce
the same behaviour. see timer-handler.{h,cc}.

-neeraj


>From: "jwkwon" <[email protected]>
>To: "NS-2" <[email protected]>
>Subject: [ns] timer...
>Date: Tue, 3 Oct 2000 09:12:42 +0900
>
>Hi~
>Could you explain this function - resched(delay)?
>
>--- example ---------------------
>void TcpAgent::set_rtx_timer()
>{
>  rtx_timer_.resched(rtt_timeout());
>}
>---------------------------------
>
>resched is defined
>---------------------------------------
>void TimerHandler::resched(double delay)
>{
>  if (status_ == TIMER_PENDING)
>   _cancel();
>  _sched(delay);
>  status_ = TIMER_PENDING;
>}
>---------------------------------------
>Thanks for any hints.
>J...
>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Neeraj Poojary
Center for Wireless Communications, UC San Diego
email: [email protected]

I'm not afraid of death. I just don't want to be there when
it happens.
-Woody Allen
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.