ó
ąxYc           @  s<   d  d l  m Z d  d l Z d Z d e f d     YZ d S(   i˙˙˙˙(   t   unicode_literalsNu   TimeItt   TimeItc           B  s)   e  Z d  Z d   Z d   Z d   Z RS(   u   
    Context manager that times the duration of the code body.
    The `duration` attribute will contain the execution time in seconds.
    c         C  s   d  |  _ d  S(   N(   t   Nonet   duration(   t   self(    (    s=   lib/python2.7/site-packages/prompt_toolkit/eventloop/utils.pyt   __init__   s    c         C  s   t  j    |  _ |  S(   N(   t   timet   start(   R   (    (    s=   lib/python2.7/site-packages/prompt_toolkit/eventloop/utils.pyt	   __enter__   s    c         G  s&   t  j    |  _ |  j |  j |  _ d  S(   N(   R   t   endR   R   (   R   t   args(    (    s=   lib/python2.7/site-packages/prompt_toolkit/eventloop/utils.pyt   __exit__   s    (   t   __name__t
   __module__t   __doc__R   R   R   (    (    (    s=   lib/python2.7/site-packages/prompt_toolkit/eventloop/utils.pyR   	   s   		(   u   TimeIt(   t
   __future__R    R   t   __all__t   objectR   (    (    (    s=   lib/python2.7/site-packages/prompt_toolkit/eventloop/utils.pyt   <module>   s   