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

Function formatUptime

nezha/nezha.ts:139–148  ·  view source on GitHub ↗
(seconds: number)

Source from the content-addressed store, hash-verified

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分";
141}
142
143function getStatusEmoji(isOnline: boolean): string {
144 return isOnline ? "🟢" : "🔴";
145}
146
147function getUsageBar(percent: number): string {
148 const filled = Math.round(percent / 10);
149 return "█".repeat(filled) + "░".repeat(10 - filled);
150}
151

Callers 1

formatServerInfoFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected