Skip to content

Instantly share code, notes, and snippets.

@DahlitzFlorian
Created April 24, 2019 20:44
Show Gist options
  • Save DahlitzFlorian/0c3ed7242b7609c053b8bf202f4c9f52 to your computer and use it in GitHub Desktop.
Save DahlitzFlorian/0c3ed7242b7609c053b8bf202f4c9f52 to your computer and use it in GitHub Desktop.
Article: How To Create Your Own Timing Context Manager
def test():
"""Stupid test function"""
L = [i for i in range(100)]
if __name__ == '__main__':
import timeit
print(timeit.timeit("test()", setup="from __main__ import test"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment