修改运行计时为时分秒增加可读性,小数点保留3位以便区分定位到秒

This commit is contained in:
lededev
2021-09-28 17:55:06 +08:00
parent a20bfc08b0
commit ef1c816483

View File

@@ -8,7 +8,7 @@ import typing
import urllib3
import config
from datetime import datetime
from datetime import datetime, timedelta
import time
from pathlib import Path
from ADC_function import file_modification_days, get_html, is_link
@@ -343,8 +343,8 @@ f'[!]运行模式:**维护模式**,本程序将在处理{count_all}个视频
rm_empty_folder(folder_path)
end_time = time.time()
total_time = end_time - start_time
print("[+]Used " + str(round(total_time,2)) + "s")
total_time = str(timedelta(seconds=end_time - start_time))
print("[+]Running time", total_time[:len(total_time) if total_time.rfind('.') < 0 else -3])
print("[+]All finished!!!")
if not (conf.auto_exit() or auto_exit):