LoginSignup
1
2

More than 5 years have passed since last update.

処理の時間を計測する

Last updated at Posted at 2018-07-14

処理時間を計測したい場合は,以下のように書くと時間が測れます.


import time

start = time.time()
"""
計測したい処理のコード
"""
elapsed_time = time.time() - start
print ("elapsed_time:{0}".format(elapsed_time) + "[sec]")
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2