Skip to content

Commit

Permalink
Round runtime to 1 decimal.
Browse files Browse the repository at this point in the history
  • Loading branch information
robinjhuang committed Apr 18, 2024
1 parent d173cc8 commit db8a493
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit db8a493

Please sign in to comment.