0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Pythonで時間計測

Posted at

Pythonで時間計測

処理毎の時間を計測したかったので自分用にメモ。

timeモジュールを使う

処理計測
from time import time  

start = time()
### Processes ###
end = time() - start
print(end)

endに処理の実行結果が格納されている。
time()は、Unixtimeを浮動小数点で返す。

参照
https://docs.python.org/ja/3.5/library/time.html

0
1
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?