View | Details | Raw Unified | Return to bug 1278
Collapse All | Expand All

(-)a/src/click/model/ipv4-click-routing.cc (-4 / +6 lines)
 Lines 252-257    Link Here 
252
{
252
{
253
  m_simNode->curtime.tv_sec = Simulator::Now ().GetSeconds ();
253
  m_simNode->curtime.tv_sec = Simulator::Now ().GetSeconds ();
254
  m_simNode->curtime.tv_usec = Simulator::Now ().GetMicroSeconds () % 1000000;
254
  m_simNode->curtime.tv_usec = Simulator::Now ().GetMicroSeconds () % 1000000;
255
  NS_LOG_DEBUG ("RunClickEvent at " << m_simNode->curtime.tv_sec << " " << 
256
                                       m_simNode->curtime.tv_usec << " " << Simulator::Now ());
255
  simclick_click_run (m_simNode);
257
  simclick_click_run (m_simNode);
256
}
258
}
257
259
 Lines 260-269    Link Here 
260
{
262
{
261
  NS_LOG_DEBUG ("HandleScheduleFromClick at " << when->tv_sec << " " << when->tv_usec << " " << Simulator::Now ());
263
  NS_LOG_DEBUG ("HandleScheduleFromClick at " << when->tv_sec << " " << when->tv_usec << " " << Simulator::Now ());
262
264
263
  double simtime = when->tv_sec + (when->tv_usec / 1.0e6);
265
  Time simtime  = Time::FromInteger(when->tv_sec, Time::S) + Time::FromInteger(when->tv_usec, Time::US);
264
  double simdelay = simtime - Simulator::Now ().GetMicroSeconds () / 1.0e6;
266
  Time simdelay = simtime - Simulator::Now();
265
267
266
  Simulator::Schedule (Seconds (simdelay), &Ipv4ClickRouting::RunClickEvent, this);
268
  Simulator::Schedule (simdelay, &Ipv4ClickRouting::RunClickEvent, this);
267
}
269
}
268
270
269
void
271
void
 Lines 613-619    Link Here 
613
        clickInstance->HandleScheduleFromClick (when);
615
        clickInstance->HandleScheduleFromClick (when);
614
616
615
        retval = 0;
617
        retval = 0;
616
        NS_LOG_DEBUG (clickInstance->GetNodeName () << " SIMCLICK_SCHEDULE: " << when->tv_sec << "s and " << when->tv_usec << "usecs later.");
618
        NS_LOG_DEBUG (clickInstance->GetNodeName () << " SIMCLICK_SCHEDULE at " << when->tv_sec << "s and " << when->tv_usec << "usecs.");
617
619
618
        break;
620
        break;
619
      }
621
      }

Return to bug 1278