Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
chore: adjust getUptimeFormatted method
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusbegby committed Sep 14, 2023
1 parent f06f2ae commit 5558c0b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/utils/system/getUptimeFormatted.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ export const getUptimeFormatted = async ({ executionId }: GetUptimeFormattedPara
});

try {
let uptimeFormattedString: string = '';

const uptimeInSeconds: number = parseFloat(process.uptime().toFixed(0));
const uptimeDate: Date = new Date(0);
uptimeDate.setSeconds(uptimeInSeconds);
uptimeFormattedString = `${
const uptimeFormattedString: string = `${
uptimeDate.getUTCDate() - 1
}d ${uptimeDate.getUTCHours()}h ${uptimeDate.getUTCMinutes()}m ${uptimeDate.getUTCSeconds()}s`;

Expand Down

0 comments on commit 5558c0b

Please # to comment.