Output python execution time

I like it recently so I'll post it so I don't forget it.

python


if __name__ == '__main__':
    start_time = time.clock()
    main()
    end_time = time.clock()
    print("TOOK TIME : {0:d} min {1:d} sec".format(int(end_time - start_time) // 60, int((end_time - start_time) % 60)))

Recommended Posts

Output python execution time
Function execution time (Python)
Python execution time measurement memo
Execution time measurement with Python With
Measure function execution time in Python
Python (from first time to execution)
First time python
python learning output
First time python
Python: Time Series Analysis
Python time series question
python input and output
Python audio input / output
Time floor function (Python)
How to measure execution time with Python Part 1
Japanese output in Python
Measurement of execution time
Basics of python: Output
python get current time
How to measure execution time with Python Part 2
Python Basic Course (3 Python Execution)
Output the time from the time the program was started in python
Get standard output in real time with Python subprocess
Try Python output with Haxe 3.2
Petit stray Python version output
[Python] Plot time series data
External command execution in Python
Time synchronization (Windows) with Python
Read Fortran output in python
python parallel / asynchronous execution memorandum
Output 2017 Premium Friday list in Python
Python
Tips on Python file input / output
Python: Time Series Analysis: Preprocessing Time Series Data
Output to csv file with Python
[Python] Variable (definition, output, value change)
Input / output with Python (Python learning memo ⑤)
[Code] Module and Python version output
[Note] Hello world output with python
Unit test log output with python
Have python read the command output
[Python3] Define a decorator to measure the execution time of a function
Time series plot started ~ python edition ~
Python unittest module execution in vs2017
See python for the first time
Notes for Python file input / output
Export and output files in Python
Python Programming Workshop-Super Introductory Python Execution Environment
Interactively output BPE using python curses
Easy parallel execution with python subprocess
Code tests around time in Python
python> Processing time measurement> time.time () --start_time
[Python] Case where the execution time differs between the built-in list and deque
Python Date / Time Library Reverse Lookup Reference
Data input / output in Python (CSV, JSON)
Manage multiple execution environments using Python venv
[Python] Matrix multiplication processing time using NumPy
Output elapsed time for data logging (for yourself)
Output color characters to pretty with python
Output tree structure of files in Python
Just print Python elapsed time in seconds