timeit¶
-
class
tollan.utils.log.timeit(arg)[source]¶ Bases:
contextlib.ContextDecoratorContext decorator that logs the execution time of the decorated item.
- Parameters
- arg: object or str
If
argtype isstr, a new decorator is returned which usesargin the generated message in places of the name of the decorated object.