MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / formatDuration

Function formatDuration

codex_image/codex_image.ts:82–88  ·  view source on GitHub ↗
(ms: number)

Source from the content-addressed store, hash-verified

80}
81
82function formatDuration(ms: number): string {
83 const totalSeconds = Math.max(0, Math.round(ms / 1000));
84 const minutes = Math.floor(totalSeconds / 60);
85 const seconds = totalSeconds % 60;
86 if (minutes <= 0) return `${seconds}秒`;
87 return `${minutes}分${seconds}秒`;
88}
89
90async function getBearerToken(): Promise<string> {
91 return await getStoredToken();

Callers 2

updateProgressStatusFunction · 0.70
handleCximgFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected