-
-
Save SuperOleg39/828901bdf9cae002f3dc2c6cfb5edbff to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getMinutes(time: number): string { | |
| const minutes = Math.floor(time / (60 * 1000)).toString(); | |
| return minutes.length > 1 ? minutes : '0' + minutes; | |
| } | |
| function getSeconds(time: number): string { | |
| const seconds = Math.round((time % (60 * 1000)) / 1000).toString(); | |
| return seconds.length > 1 ? seconds : '0' + seconds; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment