Revamp the pop-up player modal
This commit is contained in:
9
src/utility/ticksToDuration.ts
Normal file
9
src/utility/ticksToDuration.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
function ticksToDuration(ticks: number) {
|
||||
const seconds = Math.round(ticks / 10000000);
|
||||
const minutes = Math.round(seconds / 60);
|
||||
const hours = Math.round(minutes / 60);
|
||||
|
||||
return `${hours > 0 ? hours + ':' : ''}${minutes}:${(seconds % 60).toString().padStart(2, '0')}`;
|
||||
}
|
||||
|
||||
export default ticksToDuration;
|
||||
Reference in New Issue
Block a user