Enhanced time estimates for sync
This commit is contained in:
12
installer
12
installer
@ -489,7 +489,17 @@ async function loadStatus() {
|
||||
html += '<div class="progress-wrap"><div class="progress-bar" id="syncbar"></div></div>';
|
||||
html += '<p><small>Sync progress: ' + progress.toFixed(2) + '%';
|
||||
if (ibd) {
|
||||
html += ' • Estimated time left: ' + formatEta(etaSeconds);
|
||||
if (etaSeconds && isFinite(etaSeconds) && etaSeconds > 0) {
|
||||
const etaDate = new Date(Date.now() + etaSeconds * 1000);
|
||||
const etaString = etaDate.toLocaleString(undefined, {
|
||||
month: 'long',
|
||||
day: 'numeric',
|
||||
year: 'numeric',
|
||||
hour: 'numeric',
|
||||
minute: '2-digit'
|
||||
});
|
||||
html += ' • Estimated time left: ' + formatEta(etaSeconds) + ' (' + etaString + ')';
|
||||
}
|
||||
}
|
||||
html += '</small></p>';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user