Skip to content

Commit

Permalink
👽️ 调整时长计算
Browse files Browse the repository at this point in the history
  • Loading branch information
BTMuli committed Dec 25, 2024
1 parent 6494a85 commit f401b8d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/utils/toolFunc.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @file utils/toolFunc.ts
* @description 一些工具函数
* @since Beta v0.6.0
* @since Beta v0.6.7
*/

import { path } from "@tauri-apps/api";
Expand Down Expand Up @@ -235,11 +235,12 @@ export function getZhElement(element: string): string {

/**
* @description 获取视频时长
* @since Beta v0.5.7
* @param {number} duration - 视频时长(
* @since Beta v0.6.7
* @param {number} durationMill - 视频时长(毫秒
* @returns {string} 视频时长
*/
export function getVideoDuration(duration: number): string {
export function getVideoDuration(durationMill: number): string {
const duration = Math.floor(durationMill / 1000);
const seconds = duration % 60;
const minutes = Math.floor(duration / 60) % 60;
const hours = Math.floor(duration / 3600);
Expand Down

0 comments on commit f401b8d

Please sign in to comment.