Skip to content

Commit

Permalink
fix: remove fraction in second (#2630)
Browse files Browse the repository at this point in the history
* fix: remove fraction in second

* fix: decimal places for seconds

---------

Co-authored-by: KaustubhKumar05 <[email protected]>
  • Loading branch information
amar-1995 and KaustubhKumar05 authored Mar 1, 2024
1 parent a78d503 commit 0a5031f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const getFormattedTime = (milliseconds: number | undefined, precise = tru
if (!precise && (hours || minutes)) {
return formattedTime;
}
formattedTime += `${minutes >= 1 ? Math.floor(seconds) : seconds.toFixed(3)}s`;
formattedTime += `${precise ? seconds.toFixed(3) : Math.floor(seconds)}s`;

return formattedTime;
};

0 comments on commit 0a5031f

Please sign in to comment.