delay bug
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Wed, 29 Apr 2009 15:26:51 +0100
changeset 3933 b4f9526aa79d
parent 3932 e84840d98cd2
child 3934 75ef91d7fc6f
delay bug
src/contrib/flow-monitor/flow-monitor.cc
src/contrib/flow-monitor/flow-monitor.h
--- a/src/contrib/flow-monitor/flow-monitor.cc	Wed Apr 29 14:41:28 2009 +0100
+++ b/src/contrib/flow-monitor/flow-monitor.cc	Wed Apr 29 15:26:51 2009 +0100
@@ -128,7 +128,7 @@
       return;
     }
 
-  Time delay = (tracked->second.firstSeenTime - Simulator::Now ());
+  Time delay = (Simulator::Now () - tracked->second.firstSeenTime);
   probe->AddPacketStats (flowId, packetSize, delay);
 
   FlowStats &stats = GetStatsForFlow (flowId);
--- a/src/contrib/flow-monitor/flow-monitor.h	Wed Apr 29 14:41:28 2009 +0100
+++ b/src/contrib/flow-monitor/flow-monitor.h	Wed Apr 29 15:26:51 2009 +0100
@@ -45,7 +45,7 @@
     uint32_t txPackets;
     uint32_t rxPackets;
     uint32_t lostPackets;
-    uint32_t timesForwarded; // number of times a packet was forwarded, summed for all packets
+    uint32_t timesForwarded; // number of times a packet was forwarded, summed for all received packets
   };
 
   // --- basic methods ---