U
    
cg                     @   s@   d dl Z d dlZejrd dlZeddddZG dd dZdS )    N)secondsreturnc                 C   s   t |  dS )z
    Sleep strategy that delays execution for a given number of seconds.

    This is the default strategy, and may be mocked out for unit testing.
    N)timesleep)r    r   0/tmp/pip-unpacked-wheel-0v66f9d_/tenacity/nap.pyr      s    r   c                   @   s6   e Zd ZdZdddddZeje dddd	ZdS )
sleep_using_eventz0Sleep strategy that waits on an event to be set.zthreading.EventN)eventr   c                 C   s
   || _ d S )N)r	   )selfr	   r   r   r   __init__%   s    zsleep_using_event.__init__)timeoutr   c                 C   s   | j j|d d S )N)r   )r	   wait)r
   r   r   r   r   __call__(   s    zsleep_using_event.__call__)	__name__
__module____qualname____doc__r   typingOptionalfloatr   r   r   r   r   r   "   s   r   )r   r   TYPE_CHECKING	threadingr   r   r   r   r   r   r   <module>   s
   	