import time #関数をインポート
start = time.time() #開始時間を記録
### ここに処理を入れる
finish = time.time() #終了時間を記録
dt = finish - start #終了時間 − 開始時間によって処理の時間を求める
print("{0:4.3g}".format(dt) + "秒") #小数第二位で処理にかかった時間(秒)を表示
More than 5 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme