Add system info

This commit is contained in:
2024-05-04 09:11:30 +02:00
parent 768ba03807
commit c7306bdd55
10 changed files with 261 additions and 2 deletions

View File

@ -0,0 +1,10 @@
export function format_duration(duration: number): string {
const secs = duration % 60;
const mins = ((duration - secs) / 60) % 60;
const hours = ((duration - secs - mins * 60) / 3600) % 3600;
const days = Math.floor(duration / (3600 * 24));
return `${days} days ${hours.toString().padStart(2, "0")}:${mins
.toString()
.padStart(2, "0")}:${secs.toString().padStart(2, "0")}`;
}