U
    luf                     @   s   d Z G dd dZdS )z#Deprecated Stopwatch implementationc                   @   s(   e Zd ZdZdd Zdd Zdd ZdS )		StopwatchzmDeprecated zmq.Stopwatch implementation

    You can use Python's builtin timers (time.monotonic, etc.).
    c                 C   sT   dd l }|jdtdd d| _dd l}z|j| _W n tk
rN   |j| _Y nX d S )N    zJzmq.Stopwatch is deprecated. Use stdlib time.monotonic and friends instead   )
stacklevel)warningswarnDeprecationWarning_starttime	monotonic
_monotonicAttributeError)selfr   r	    r   7/tmp/pip-unpacked-wheel-h6ekxre8/zmq/sugar/stopwatch.py__init__   s    zStopwatch.__init__c                 C   s   |   | _dS )zStart the counterN)r   r   )r   r   r   r   start   s    zStopwatch.startc                 C   s   |   }td|| j  S )z'Return time since start in microsecondsg    .A)r   intr   )r   stopr   r   r   r   !   s    zStopwatch.stopN)__name__
__module____qualname____doc__r   r   r   r   r   r   r   r      s   r   N)r   r   r   r   r   r   <module>   s   