A library which allows to measure the execution time of an entire file.
Timeself is intended to measure and print, the caller script, execution time.
pip install timeself
from timeself import timeself def is_five_divisible(num): if num % 5 == 0: return True else: return False print(is_five_divisible(20)) timeself() # Must be the last line on the script. # Output Execution time: 2.2221007384359837e-05
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.