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:
@@ -68,6 +68,10 @@ struct ThreadBenchmarkCancel {
|
||||
};
|
||||
ThreadBenchmarkCancel PlanThreadBenchmarkCancel(const ThreadBenchmark& benchmark);
|
||||
|
||||
// Wall-clock step for the benchmark: seconds since the previous call, clamped to [0, maxStep]. The first call
|
||||
// (lastSec < 0) returns 0. Updates lastSec.
|
||||
float AdvanceBenchmarkClock(double& lastSec, double nowSec, float maxStep);
|
||||
|
||||
ThreadBenchmarkUpdate AdvanceThreadBenchmark(ThreadBenchmark& benchmark,
|
||||
float deltaSeconds,
|
||||
double poolHashrate10s);
|
||||
|
||||
Reference in New Issue
Block a user