from time import time
t1 = time()
# ------- 측정할 로직 ---------
t2 = time()
cost_time = t2 - t1
hours, rem = divmod(cost_time, 3600)
minutes, seconds = divmod(rem, 60)
logger.info(f'cost time : {int(hours):02d}:{int(minutes):02d}:{int(seconds):02d}')
cost time : 01:23:45
'Python' 카테고리의 다른 글
Ubuntu 22.04.3 LTS - Python 버전 변경하기 (0) | 2023.08.21 |
---|---|
[Python] Linux-Ubuntu 20.04 Python 3.8 설치 방법 (0) | 2023.08.18 |