From db8a493e9f8ec70b97917d0fd147b14cc4e664f2 Mon Sep 17 00:00:00 2001 From: Robin Huang Date: Thu, 18 Apr 2024 13:45:23 -0400 Subject: [PATCH] Round runtime to 1 decimal. --- pages/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/index.tsx b/pages/index.tsx index e406ffc..e7a9736 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -211,7 +211,7 @@ function GitCommitsList() { function calculateTimeDifferenceInMinutes(startTime: number, endTime: number): number { const differenceInSeconds = Math.abs(endTime - startTime); const differenceInMinutes = differenceInSeconds / 60; - return differenceInMinutes; + return parseFloat(differenceInMinutes.toFixed(1)); } export default GitCommitsList