Python Timer Functions
This article shows how to measure the runtime of Python code using the time module. It then builds a reusable Timer class that can also be used as a context manager, which is a tool for setup and cleanup around a block of code.