mirror of
https://github.com/xmrig/xmrig.git
synced 2025-01-22 18:54:43 +00:00
Fix HashrateInterpolator::addDataPoint
This commit is contained in:
parent
3fbf2ac3d4
commit
22a69f70da
1 changed files with 2 additions and 4 deletions
|
@ -55,10 +55,8 @@ void xmrig::HashrateInterpolator::addDataPoint(uint64_t count, uint64_t timeStam
|
|||
std::lock_guard<std::mutex> l(m_lock);
|
||||
|
||||
// Clean up old data
|
||||
if (!m_data.empty()) {
|
||||
while (timeStamp - m_data.front().second > LagMS * 2) {
|
||||
m_data.pop_front();
|
||||
}
|
||||
while (!m_data.empty() && (timeStamp - m_data.front().second > LagMS * 2)) {
|
||||
m_data.pop_front();
|
||||
}
|
||||
|
||||
m_data.emplace_back(count, timeStamp);
|
||||
|
|
Loading…
Reference in a new issue