mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-25 02:36:10 +03:00
Revert "Change clamping of update interval of SpeedPlotView::Averager"
This reverts commit 435bb34435
.
To achieve what the reverted commit wants, the timing
would need to be taken iteratively rather that cumulatively
fixes #14735
This commit is contained in:
parent
21b3c61162
commit
3f32b040dc
1 changed files with 2 additions and 1 deletions
|
@ -120,7 +120,8 @@ bool SpeedPlotView::Averager::push(const SampleData &sampleData)
|
|||
|
||||
// system may go to sleep, that can cause very big elapsed interval
|
||||
const milliseconds updateInterval {static_cast<int64_t>(BitTorrent::Session::instance()->refreshInterval() * 1.25)};
|
||||
const milliseconds elapsed {std::min(milliseconds {m_lastSampleTime.elapsed()}, updateInterval)};
|
||||
const milliseconds maxElapsed {std::max(updateInterval, m_resolution)};
|
||||
const milliseconds elapsed {std::min(milliseconds {m_lastSampleTime.elapsed()}, maxElapsed)};
|
||||
if (elapsed < m_resolution)
|
||||
return false; // still accumulating
|
||||
|
||||
|
|
Loading…
Reference in a new issue