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:
songtianlun 2025-02-14 11:09:33 +08:00
parent ec8f89e07a
commit b01cbe960a

View File

@ -12,7 +12,7 @@ export default class extends Controller {
const endTime = performance.now();
const loadTime = endTime - startTime;
// 更新显示
this.timerTarget.textContent = loadTime;
this.timerTarget.textContent = Math.ceil( loadTime );
});
}
}