v03 update 04

This commit is contained in:
13339479676 2022-01-16 07:19:44 +08:00
parent c894e8ae38
commit e793b62c29
1 changed files with 2 additions and 1 deletions

View File

@ -74,6 +74,8 @@ def webcam_opencv(device_index=0, quit_key="q", pause_key="p", is_autoSaveFrame=
logTime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) # 日志时间
log_management(f'{logTime}\n', logName, logMode) # 记录日志时间
time_list = [1, 60, 3600] # 时间参数列表
# ------------------程序开始------------------
s_time = time.time() # 起始时间
dev_index = eval(device_index) if device_index.isnumeric(
@ -141,7 +143,6 @@ def webcam_opencv(device_index=0, quit_key="q", pause_key="p", is_autoSaveFrame=
print(f'程序结束!')
e_time = time.time() # 终止时间
total_time = e_time - s_time # 程序用时
time_list = [1, 60, 3600]
outTimeMsg = f'用时:{round(total_time/time_list[0], 3)}秒, {round(total_time/time_list[1], 3)}分, {round(total_time/time_list[2], 3)}小时'
print(outTimeMsg)
log_management(f'{outTimeMsg}\n', logName, logMode) # 记录用时