In this quiz, you’ll test your understanding of Python Timer Functions: Three Ways to Monitor Your Code.

By working through this quiz, you’ll revisit why time.perf_counter() is the go-to clock for timing code and how to wrap a timer in a class, a context manager, and a decorator. You’ll also review timeit and cProfile for benchmarking and profiling your programs.


[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]