Getting Started
API Reference
Timer
Context manager for timing code snippets.
name (str) – if specified, print it together with the elapsed time when exiting the context
time (float) – elapsed time (only available after exiting the context)
Example:
>>> with Timer("100000 divisions"): ... result = [i / 42 for i in range(100000)] ... 4112.60 us [100000 divisions]