2022-05-10 23:52:58 +02:00
|
|
|
function ticksToDuration(ticks: number) {
|
|
|
|
|
const seconds = Math.round(ticks / 10000000);
|
2023-04-23 01:04:30 +02:00
|
|
|
const minutes = Math.floor(seconds / 60);
|
|
|
|
|
const hours = Math.floor(minutes / 60);
|
2022-05-10 23:52:58 +02:00
|
|
|
|
|
|
|
|
return `${hours > 0 ? hours + ':' : ''}${minutes}:${(seconds % 60).toString().padStart(2, '0')}`;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default ticksToDuration;
|