Implemented basic functionality to bring the bot online

This commit is contained in:
2024-10-11 18:32:21 +02:00
parent 6542603771
commit 57282d9c56
4 changed files with 60 additions and 1 deletions
+6 -1
View File
@@ -13,4 +13,9 @@ def get_elapsed_time_ms(timestamp:float) -> str:
def get_elapsed_time_smal(timestamp:float) -> str:
"""Convert an timestamp into an predefined elapsed time format (00sec 000ms)"""
time_elapsed = datetime.fromtimestamp(timestamp)
return f"{time_elapsed.second:02}sec {time_elapsed.microsecond // 1000:03}ms"
return f"{time_elapsed.second:02}sec {time_elapsed.microsecond // 1000:03}ms"
def get_elapsed_time_big(timestamp:float) -> str:
"""Convert an timestamp into an predefined elapsed time format (00sec 000ms)"""
time_elapsed = datetime.fromtimestamp(timestamp)
return f"{time_elapsed.day - 1}days {time_elapsed.hour - 1}hrs {1 if time_elapsed.minute == 0 else time_elapsed.minute}min"