MCPcopy Create free account
hub / github.com/ZyphrZero/z.ai2api_python / get_process_uptime

Function get_process_uptime

app/admin/stats.py:80–83  ·  view source on GitHub ↗

获取当前进程运行时长。

()

Source from the content-addressed store, hash-verified

78
79
80def get_process_uptime() -> str:
81 """获取当前进程运行时长。"""
82 created_at = psutil.Process(os.getpid()).create_time()
83 return format_uptime(int(time.time() - created_at))
84
85
86async def collect_admin_stats(

Callers 1

dashboardFunction · 0.90

Calls 1

format_uptimeFunction · 0.85

Tested by

no test coverage detected