fix(app): advance logic timers by wall-clock time

Logic timers advanced by io.DeltaTime, which update() clamps to 0.25 s
so animations don't jump after a pause. That matched real time only
while the main loop rendered continuously: with frames seconds apart, a
timer fed the clamped delta runs up to 8x slow. Affected: the refresh
scheduler, the seed-migration poll, the chat fast scan, the encryption
check, the loading and shutdown timers, the lock-screen countdowns, the
Settings debug gate and the mining benchmark.

- App::logicDeltaTime(): steady-clock seconds since the previous
  update(), capped at 6 s so a sleep/resume fires each timer once
  instead of replaying the gap. Visual interpolation keeps the clamped
  io.DeltaTime.
- The refresh timers tick before the RPC results are drained, so a
  hold that a callback arms (the connect-retry backoff) starts fresh
  instead of being charged the gap before it existed.
- The shutdown timer is measured from shutdown_start_time_:
  beginShutdown runs from SDL event handling, so an accumulated delta
  would count the idle gap before the close request.
- The lock-screen error and lockout countdowns subtract only the time
  since they were armed: a failed unlock arms them from an RPC result,
  which can land on the frame that ends an idle gap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-03 19:51:02 -05:00
co-authored by Claude Opus 5.5
parent ffce7cad24
commit 402a3053dc
5 changed files with 51 additions and 13 deletions
+1 -1
View File
@@ -249,7 +249,7 @@ static void RenderMiningTabContent(App* app)
// ================================================================
if (s_benchmark.active()) {
auto benchmarkUpdate = AdvanceThreadBenchmark(
s_benchmark, ImGui::GetIO().DeltaTime, state.pool_mining.hashrate_10s);
s_benchmark, app->logicDeltaTime(), state.pool_mining.hashrate_10s);
if (benchmarkUpdate.stopPoolMining) {
app->stopPoolMining();
}