Convert time unit for progress

This commit is contained in:
KnugiHK
2026-01-17 13:22:56 +08:00
parent cd35ffc185
commit 064b923cfa
6 changed files with 20 additions and 20 deletions
+1 -1
View File
@@ -254,7 +254,7 @@ def import_from_json(json_file: str, data: ChatCollection):
data.add_chat(jid, chat)
pbar.update(1)
total_time = pbar.format_dict['elapsed']
logger.info(f"Imported {total_row_number} chats from JSON in {total_time:.2f} seconds{CLEAR_LINE}")
logger.info(f"Imported {total_row_number} chats from JSON in {convert_time_unit(total_time)}{CLEAR_LINE}")
def incremental_merge(source_dir: str, target_dir: str, media_dir: str, pretty_print_json: int, avoid_encoding_json: bool):