Hello all
Below is a part of code which describes my problem. In the first function
"wakeupTimer()", i create an event. The event should call another function
"retryQuery()", after a timeout of 5 seconds from which the event is called.
But for me while i execute the ns code, and if i start my simulation at 0
seconds the event retryQuery() function should have been called after 5
seconds naturally, but actually it is calling immediately i.e at "0" seconds
itself. Is the code that i have written wrong.

wakeupTimer(int id) {
      Scheduler &s = Scheduler::instance();
       timeout = Scheduler::instance().clock() + 5;
       Event *point_e = (Event *)retryQuery(id,nbIteration);
       if (point_e!=NULL)
           s.schedule((Handler *)this, point_e, timeout) ;
}

Event *dns_resolverAgent::retryQuery(int id,int nb_iteration){
      wakeupTimer(int id);
}

Reply via email to