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

Function formatSpeed

nezha/nezha.ts:135–137  ·  view source on GitHub ↗
(bytes: number)

Source from the content-addressed store, hash-verified

133 const days = Math.floor(seconds / 86400);
134 const hours = Math.floor((seconds % 86400) / 3600);
135 const minutes = Math.floor((seconds % 3600) / 60);
136 const parts: string[] = [];
137 if (days > 0) parts.push(`${days}天`);
138 if (hours > 0) parts.push(`${hours}时`);
139 if (minutes > 0) parts.push(`${minutes}分`);
140 return parts.join("") || "0分";

Callers 1

formatServerInfoFunction · 0.70

Calls 1

formatBytesFunction · 0.70

Tested by

no test coverage detected