MCPcopy
hub / github.com/guelfoweb/knockpy / fmt_td

Function fmt_td

knockpy/engine/runtime.py:83–89  ·  view source on GitHub ↗
(td: Optional[timedelta])

Source from the content-addressed store, hash-verified

81
82
83def fmt_td(td: Optional[timedelta]) -> str:
84 if td is None:
85 return "-"
86 total_seconds = int(td.total_seconds())
87 hours, rem = divmod(total_seconds, 3600)
88 minutes, seconds = divmod(rem, 60)
89 return f"{hours:02d}:{minutes:02d}:{seconds:02d}"
90
91
92async def _axfr_check_root(domain: str, dns_server: Optional[str], timeout: float) -> Dict[str, Any]:

Callers 4

outputFunction · 0.85
show_reports_catalogFunction · 0.85
test_fmt_td_noneFunction · 0.85

Calls

no outgoing calls

Tested by 2

test_fmt_td_noneFunction · 0.68