Use toLocaleString for final bake stats

This commit is contained in:
j433866 2019-05-31 09:59:23 +01:00
parent 1d20fe13f3
commit d6a80b4865
1 changed files with 2 additions and 2 deletions

View File

@ -356,7 +356,7 @@ class WorkerWaiter {
bakingComplete() {
this.setBakingStatus(false);
let duration = new Date().getTime() - this.bakeStartTime;
duration = duration.toString() + "ms";
duration = duration.toLocaleString() + "ms";
const progress = this.getBakeProgress();
let width = progress.total.toString().length;
@ -365,7 +365,7 @@ class WorkerWaiter {
}
width = width < 2 ? 2 : width;
const totalStr = progress.total.toString().padStart(width, " ").replace(/ /g, "&nbsp;");
const totalStr = progress.total.toLocaleString().padStart(width, " ").replace(/ /g, "&nbsp;");
const durationStr = duration.padStart(width, " ").replace(/ /g, "&nbsp;");
const msg = `Total: ${totalStr}<br>Time: ${durationStr}`;