Index: trunk/BNC/bncfigure.cpp
===================================================================
--- trunk/BNC/bncfigure.cpp	(revision 1980)
+++ trunk/BNC/bncfigure.cpp	(revision 1981)
@@ -178,5 +178,4 @@
 
     int xx = xMin+70+anchor*12;
-    int yy = int(yLength * (it.value()->_mean / _maxRate));
 
     painter.save();
@@ -187,4 +186,5 @@
 
     if(_maxRate > 0.0) {
+      int yy = int(yLength * (it.value()->_mean / _maxRate));
       QColor color = QColor::fromRgb(_rgb[0][anchor],_rgb[1][anchor],_rgb[2][anchor]);
       painter.fillRect(xx-13, int((yMax-yMin)*xLine)-yy, 9, yy, 
Index: trunk/BNC/bncfigurelate.cpp
===================================================================
--- trunk/BNC/bncfigurelate.cpp	(revision 1980)
+++ trunk/BNC/bncfigurelate.cpp	(revision 1981)
@@ -68,13 +68,6 @@
   QMutexLocker locker(&_mutex);
 
-  _counter = 0;
   _maxLate = 0;
-
-  QMapIterator<QByteArray, sumAndMean*> it1(_bytes);
-  while (it1.hasNext()) {
-    it1.next();
-    delete it1.value();
-  }
-  _bytes.clear();
+  _latency.clear();
 
   bncSettings settings;
@@ -84,5 +77,5 @@
     QUrl        url(hlp[0]);
     QByteArray  staID = url.path().mid(1).toAscii();
-    _bytes[staID] = new sumAndMean();
+    _latency[staID] = 0.0;
   }
 }
@@ -92,7 +85,10 @@
 void bncFigureLate::slotNewLatency(const QByteArray staID, double clate) {
   QMutexLocker locker(&_mutex);
-  QMap<QByteArray, sumAndMean*>::const_iterator it = _bytes.find(staID);
-  if (it != _bytes.end()) {
-    it.value()->_sum += fabs(clate)*1000.;
+  if (_latency.find(staID) != _latency.end()) {
+    double ms = fabs(clate)*1000.0;
+    _latency[staID] = ms;
+    if (ms > _maxLate) {
+      _maxLate = ms;
+    }
   }
 }
@@ -102,27 +98,5 @@
 void bncFigureLate::slotNextAnimationFrame() {
   QMutexLocker locker(&_mutex);
-
-  const static int MAXCOUNTER = 10;
-
-  ++_counter;
-
-  // If counter reaches its maximal value, compute the mean value
-  // ------------------------------------------------------------
-  if (_counter == MAXCOUNTER) {
-    _maxLate = 0.0;
-    QMapIterator<QByteArray, sumAndMean*> it(_bytes);
-    while (it.hasNext()) {
-      it.next();
-      it.value()->_mean = it.value()->_sum / _counter;
-      it.value()->_sum  = 0.0;
-      if (it.value()->_mean > _maxLate) {
-        _maxLate = it.value()->_mean;
-      }
-    }
-    _counter = 0;
-  }
-
   update();
-
   QTimer::singleShot(1000, this, SLOT(slotNextAnimationFrame()));
 }
@@ -162,5 +136,5 @@
 
   int anchor = 0;
-  QMapIterator<QByteArray, sumAndMean*> it(_bytes);
+  QMapIterator<QByteArray, double> it(_latency);
   while (it.hasNext()) {
     it.next();
@@ -168,5 +142,4 @@
 
     int xx = xMin+70+anchor*12;
-    int yy = int(yLength * (it.value()->_mean / _maxLate));
 
     painter.save();
@@ -177,4 +150,5 @@
 
     if(_maxLate > 0.0) {
+      int yy = int(yLength * (it.value() / _maxLate));
       QColor color = QColor::fromRgb(_rgb[0][anchor],_rgb[1][anchor],_rgb[2][anchor]);
       painter.fillRect(xx-13, int((yMax-yMin)*xLine)-yy, 9, yy, 
Index: trunk/BNC/bncfigurelate.h
===================================================================
--- trunk/BNC/bncfigurelate.h	(revision 1980)
+++ trunk/BNC/bncfigurelate.h	(revision 1981)
@@ -41,17 +41,8 @@
   void slotNextAnimationFrame();
  private:
-  class sumAndMean {
-   public:
-    sumAndMean() {_mean = 0.0; _sum = 0.0;}
-    ~sumAndMean() {}
-    double _mean;
-    double _sum;
-  };
-  QMap<QByteArray, sumAndMean*> _bytes;
-  QMutex                        _mutex;
-  int                           _counter;
-  int                           _counter1;
-  double                        _maxLate;
-  int                           _rgb[3][1001];
+  QMap<QByteArray, double> _latency;
+  QMutex                   _mutex;
+  double                   _maxLate;
+  int                      _rgb[3][1001];
 };
 
