
                         2    d dl mZ d dlZdZ G d de      Zy)    )unicode_literalsN)TimeItc                   "    e Zd ZdZd Zd Zd Zy)r   z
    Context manager that times the duration of the code body.
    The `duration` attribute will contain the execution time in seconds.
    c                     d | _         y N)durationselfs    1lib/third_party/prompt_toolkit/eventloop/utils.py__init__zTimeIt.__init__   s	        c                 8    t        j                          | _        | S r   )timestartr	   s    r   	__enter__zTimeIt.__enter__   s    YY[
r   c                 r    t        j                          | _        | j                  | j                  z
  | _        y r   )r   endr   r   )r
   argss     r   __exit__zTimeIt.__exit__   s#    99;4::-r   N)__name__
__module____qualname____doc__r   r   r    r   r   r   r   	   s    .r   r   )
__future__r   r   __all__objectr   r   r   r   <module>r      s    ' 
.V .r   