From 64b790e49f520dd47e30ac9a04c3ddf10d5e45e8 Mon Sep 17 00:00:00 2001 From: break27 Date: Wed, 8 Jul 2026 17:39:25 +0800 Subject: [PATCH] minor fix --- index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 8adea08..365247a 100644 --- a/index.html +++ b/index.html @@ -461,9 +461,9 @@ while (await new Promise(o => setTimeout(o, 1000, true))) { let uptime = await Rpc2.invoke('uptime').catch(() => 0); $('#uptimeLabel').innerText = Temporal.Duration.from({ seconds: uptime }).round({ largestUnit: 'hours' }).toLocaleString('en', { style: 'digital' }); - let rate = count / uptime; - let remaining = count ? Math.floor((total - count) / rate) : 0; - $('#remainingLabel').innerText = remaining >= 0 ? `${Temporal.Duration.from({ seconds: remaining }).round({ largestUnit: 'hours' }).toLocaleString('en')} (${(rate * 60).toFixed(2)}/min)` : ''; + let rate = done / uptime; + let remaining = rate > 0 ? Math.floor((total - count) / rate) : 0; + $('#remainingLabel').innerText = remaining > 0 ? `${Temporal.Duration.from({ seconds: remaining }).round({ largestUnit: 'hours' }).toLocaleString('en')} (${(rate * 60).toFixed(2)}/min)` : ''; break; case 'STANDBY': $('#send > span.text').innerText = 'Resume';