Changeset 1934 in ntrip
- Timestamp:
- Nov 12, 2009, 8:15:03 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncfigure.cpp
r1933 r1934 96 96 void bncFigure::slotNextAnimationFrame() { 97 97 QMutexLocker locker(&_mutex); 98 if (++_counter == 10) { 99 QMapIterator<QByteArray, sumAndMean*> it(_bytes); 100 while (it.hasNext()) { 101 it.next(); 102 it.value()->_mean = it.value()->_sum / _counter; 98 99 const static int MAXCOUNTER = 10; 100 101 ++_counter; 102 103 QMapIterator<QByteArray, sumAndMean*> it(_bytes); 104 while (it.hasNext()) { 105 it.next(); 106 it.value()->_mean = it.value()->_sum / _counter; 107 if (_counter == MAXCOUNTER) { 103 108 it.value()->_sum = 0.0; 104 109 } 110 } 111 112 if (_counter == MAXCOUNTER) { 105 113 _counter = 0; 106 114 } 115 107 116 update(); 108 117 QTimer::singleShot(1000, this, SLOT(slotNextAnimationFrame()));
Note:
See TracChangeset
for help on using the changeset viewer.