- Timestamp:
- Nov 12, 2009, 8:20:30 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/BNC/bncfigure.cpp ΒΆ
r1934 r1935 101 101 ++_counter; 102 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) { 108 it.value()->_sum = 0.0; 109 } 110 } 111 103 // If counter reaches its maximal value, compute the mean rate 104 // ----------------------------------------------------------- 112 105 if (_counter == MAXCOUNTER) { 106 QMapIterator<QByteArray, sumAndMean*> it(_bytes); 107 while (it.hasNext()) { 108 it.next(); 109 it.value()->_mean = it.value()->_sum / _counter; 110 it.value()->_sum = 0.0; 111 } 113 112 _counter = 0; 114 113 } 115 114 116 115 update(); 116 117 117 QTimer::singleShot(1000, this, SLOT(slotNextAnimationFrame())); 118 118 }
Note:
See TracChangeset
for help on using the changeset viewer.