+ XBT_DEBUG("doing a ns3 simulation for a duration of %f", now);
+ ns3_simulator(now);
+ time_to_next_flow_completion = ns3::Simulator::Now().GetSeconds() - surf_get_clock();
+ // NS-3 stops as soon as a flow ends,
+ // but it does not process the other flows that may finish at the same (simulated) time.
+ // If another flow ends at the same time, time_to_next_flow_completion = 0
+ if(double_equals(time_to_next_flow_completion, 0, sg_surf_precision))
+ time_to_next_flow_completion = 0.0;
+