MCPcopy Create free account
hub / github.com/VJBots/VJ-Forward-Bot / TimeFormatter

Function TimeFormatter

plugins/regix.py:398–408  ·  view source on GitHub ↗
(milliseconds: int)

Source from the content-addressed store, hash-verified

396# Ask Doubt on telegram @KingVJ01
397
398def TimeFormatter(milliseconds: int) -> str:
399 seconds, milliseconds = divmod(int(milliseconds), 1000)
400 minutes, seconds = divmod(seconds, 60)
401 hours, minutes = divmod(minutes, 60)
402 days, hours = divmod(hours, 24)
403 tmp = ((str(days) + "d, ") if days else "") + \
404 ((str(hours) + "h, ") if hours else "") + \
405 ((str(minutes) + "m, ") if minutes else "") + \
406 ((str(seconds) + "s, ") if seconds else "") + \
407 ((str(milliseconds) + "ms, ") if milliseconds else "")
408 return tmp[:-2]
409
410# Don't Remove Credit Tg - @VJ_Botz
411# Subscribe YouTube Channel For Amazing Bot https://youtube.com/@Tech_VJ

Callers 2

editFunction · 0.85
status_msgFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected