| 84 | } |
| 85 | |
| 86 | double RingBuffer::CalculateRate(RingBuffer::SizeType tv, RingBuffer::SizeType span) |
| 87 | { |
| 88 | std::unique_lock<std::mutex> lock(m_Mutex); |
| 89 | |
| 90 | int sum = UpdateAndGetValuesUnlocked(tv, span); |
| 91 | return sum / static_cast<double>(std::min(span, m_InsertedValues)); |
| 92 | } |
no outgoing calls
no test coverage detected