a
    õ£Be§  ã                   @   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   sR   dd l }|jdtdd� d| _dd l}z|j| _W n tyL   |j| _Y n0 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   úV/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/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   