PyMOTW: timeit
Originally posted
· 1 min read
The timeit
module provides a simple interface for determining the execution time of small bits of Python code. It uses a platform-specific time function to provide the most accurate time calculation possible.