[Python]実行時間を計測

7月 26, 2020

import time

t1 = time.time()

"""
ここに処理を書く
"""

t2 = time.time()
elapsed_time = t2-t1
print(f"elapsed time: {elapsed_time/3600} h")

Uncategorized

Posted by user