diff options
author | Ivan Blinkov <ivan@blinkov.ru> | 2022-02-10 16:47:11 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:11 +0300 |
commit | 5b283123c882433dafbaf6b338adeea16c1a0ea0 (patch) | |
tree | 339adc63bce23800021202ae4a8328a843dc447a /contrib/python/prompt-toolkit/py2/prompt_toolkit/eventloop/utils.py | |
parent | 1aeb9a455974457866f78722ad98114bafc84e8a (diff) | |
download | ydb-5b283123c882433dafbaf6b338adeea16c1a0ea0.tar.gz |
Restoring authorship annotation for Ivan Blinkov <ivan@blinkov.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/python/prompt-toolkit/py2/prompt_toolkit/eventloop/utils.py')
-rw-r--r-- | contrib/python/prompt-toolkit/py2/prompt_toolkit/eventloop/utils.py | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/contrib/python/prompt-toolkit/py2/prompt_toolkit/eventloop/utils.py b/contrib/python/prompt-toolkit/py2/prompt_toolkit/eventloop/utils.py index 56b4646d1c..ff3a4cfd69 100644 --- a/contrib/python/prompt-toolkit/py2/prompt_toolkit/eventloop/utils.py +++ b/contrib/python/prompt-toolkit/py2/prompt_toolkit/eventloop/utils.py @@ -1,23 +1,23 @@ -from __future__ import unicode_literals -import time - -__all__ = ( - 'TimeIt', -) - - -class TimeIt(object): - """ - Context manager that times the duration of the code body. - The `duration` attribute will contain the execution time in seconds. - """ - def __init__(self): - self.duration = None - - def __enter__(self): - self.start = time.time() - return self - - def __exit__(self, *args): - self.end = time.time() - self.duration = self.end - self.start +from __future__ import unicode_literals +import time + +__all__ = ( + 'TimeIt', +) + + +class TimeIt(object): + """ + Context manager that times the duration of the code body. + The `duration` attribute will contain the execution time in seconds. + """ + def __init__(self): + self.duration = None + + def __enter__(self): + self.start = time.time() + return self + + def __exit__(self, *args): + self.end = time.time() + self.duration = self.end - self.start |