fix(mining): keep the thread benchmark running while the tab is hidden

The thread benchmark state machine was advanced from the Mining tab's
render path, so it only progressed while that tab was visible and the
window was on screen. Hiding the tab or minimizing the window froze the
benchmark mid-sweep.

- The benchmark now advances from the main update loop, ungated by
  connectivity, so it keeps running when the tab is hidden or the window
  is minimized.
- Its clock is driven from a steady wall-clock reading rather than the
  render delta, and each step is clamped like the other logic timers so
  a suspend/resume cannot leap a benchmark phase.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-10-13 16:00:10 -05:00
co-authored by Claude Opus 4.8
parent fae5ef05b9
commit 32ea4d0524
5 changed files with 41 additions and 19 deletions
+3
View File
@@ -1079,6 +1079,9 @@ void App::update()
// Mine-when-idle check (cheap on most frames: it gates itself to 1 Hz)
checkIdleMining();
// Thread benchmark: ungated (xmrig->pool is daemon-independent) so it advances while minimized/tab hidden.
ui::TickMiningBenchmark(this, state_.pool_mining.hashrate_10s);
// P8: Dedup rebuildAddressList — only rebuild once per frame
if (address_list_dirty_) {
address_list_dirty_ = false;