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

Function formatUptime

komari/komari.ts:178–185  ·  view source on GitHub ↗
(seconds: number)

Source from the content-addressed store, hash-verified

176
177// 格式化运行时间
178function formatUptime(seconds: number): string {
179 const days = Math.floor(seconds / 86400);
180 const hours = Math.floor((seconds % 86400) / 3600);
181 const minutes = Math.floor((seconds % 3600) / 60);
182 const secs = seconds % 60;
183
184 return `${days} 天 ${hours} 时 ${minutes} 分 ${secs} 秒`;
185}
186
187// 格式化过期时间
188function formatExpiredDate(dateStr: string): string {

Callers 1

getNodeDetailsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected