fix: round load time to the nearest whole number
- Update load time display to show the rounded value instead of the raw measurement. - This change improves the readability of the load time for end users by providing a more user-friendly format. The adjustment enhances the user experience by presenting the load time in a cleaner and more comprehensible manner.
This commit is contained in:
parent
ec8f89e07a
commit
b01cbe960a
@ -12,7 +12,7 @@ export default class extends Controller {
|
|||||||
const endTime = performance.now();
|
const endTime = performance.now();
|
||||||
const loadTime = endTime - startTime;
|
const loadTime = endTime - startTime;
|
||||||
// 更新显示
|
// 更新显示
|
||||||
this.timerTarget.textContent = loadTime;
|
this.timerTarget.textContent = Math.ceil( loadTime );
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user