Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 27, 2005, 7:05:34 PM (18 years ago)
Author:
patrick
Message:

network: included more comments to make it easier to debug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/lib/network/connection_monitor.cc

    r5798 r5800  
    8888  /*Update the lifetime Variables*/
    8989  totalReceivedPackets ++;
    90   averageDatarate = totalReceivedPackets/(currentPacketTick - startTime);
     90  float timeDiff = this->currentPacketTick - this->startTime;
     91  if( timeDiff != 0.0f )
     92    averageDatarate = totalReceivedPackets/timeDiff;
    9193
    9294  /*Preparefor the next Packet*/
     
    134136//   PRINT(0)("Total lost packets:",totalLostPackets);
    135137//   PRINT(0)("Packetloss [%] :\n",totalPacketloss);
    136 // 
     138//
    137139//   PRINT(0)("Current datarate :\n",currentDatarate);
    138140//   PRINT(0)("Delays of the last few packets :\n");
    139141//   for(int i=1 ;i <= packetToAverage-1;i++)
    140142//     PRINT(0)("%i ",lastFewDelays[i]);
    141 // 
     143//
    142144//   PRINT(0)("============================================\n");
    143145
Note: See TracChangeset for help on using the changeset viewer.