This commit is contained in:
2024-06-28 12:13:42 +03:00
parent 5398af0d3e
commit e6b738de58
4 changed files with 19 additions and 7 deletions

View File

@@ -50,4 +50,13 @@ async function addAgent() {
const FORMAT_CONNECTION_STATUS = (x) => ["Offline", "Connecting...", "Online"][x];
const FORMAT_TIME = (x) => {
var hours = Math.floor(x / 3600);
var minutes = Math.floor((x - (hours * 3600)) / 60);
var seconds = x - (hours * 3600) - (minutes * 60);
if (hours < 10) { hours = "0" + hours; }
if (minutes < 10) { minutes = "0" + minutes; }
if (seconds < 10) { seconds = "0" + seconds; }
return hours + ':' + minutes + ':' + seconds;
}