[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New Timer
expire() is automatically called when the timer expires. you don't
explicitly trigger it. In case you want to know how it works, read
TimerHandler::handle() in timer-hander.cc
On Thu, 3 Feb 2000, Chan Kwang Mien wrote:
>
> hi there,
>
> i tried the example in the NS documentation to create a new timer as
> follows :
>
> class mytimer : public TimerHandler {
> public:
> virtual double expire(Event *e)
>
> protected:
> MyAgent *a_ ;
> };
>
> and also define a
>
> double mytimer::expire(Event *e)
> {
>
> ....
> }
>
> i would like to know how to set the interval variable so that when the
> interval reaches 0, it activates the expire function.
>
> Thanks.
>
> rgds,
> mien
>