From c683105d1eb00b266c03296e184df9b953b24be2 Mon Sep 17 00:00:00 2001 From: Cooper Ransom Date: Sun, 17 Mar 2024 22:56:19 -0400 Subject: [PATCH] Make minutes show as percent of hour --- src/pages/TopFlix.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/TopFlix.tsx b/src/pages/TopFlix.tsx index c6efeb18..c7e6ccb7 100644 --- a/src/pages/TopFlix.tsx +++ b/src/pages/TopFlix.tsx @@ -164,9 +164,10 @@ async function getTimeSinceProcessStart(): Promise { const hours = Math.floor(timeDifference / (1000 * 60 * 60)); const minutes = Math.floor((timeDifference % (1000 * 60 * 60)) / (1000 * 60)); const seconds = Math.floor((timeDifference % (1000 * 60)) / 1000); + const percentageOfHour = Math.ceil(minutes / 60); if (hours > 0) { - return `${hours}:${minutes} hours`; + return `${hours}.${percentageOfHour} hours`; } if (minutes > 0) { return `${minutes} minutes`;