pylib.helper module¶
Helper objects.
- Date
2020-01-01
-
class
timeit(description=None)[source]¶ Bases:
contextlib.ContextDecoratorMeassure time for a function or code block.
- Parameters
description (str) – description for the function or code block used for the print-out
- Example
>>> with timeit('section_test'): ... # code section_test took 0.006 ms
@timeit('func') def func(): # code
>>> func() func took 0.006 ms