a
    §ˆcÛ  ã                   @   s4   d dl mZmZ G dd„ deƒZdd„ Zdd„ ZdS )	é    )ÚCallbackTimerÚTimerc                       s$   e Zd ZdZdZ‡ fdd„Z‡  ZS )ÚDoLaterTimerz¢ Performs a callback once at a later time.

    This is not used by the `do_later` functions and is only provided for
    backwards compatibility of the API.
    é   c                    s    t ƒ j||g|¢R i |¤Ž d S )N)ÚsuperÚ__init__)ÚselfÚintervalÚcallableÚargsZkw_args©Ú	__class__© úX/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/pyface/timer/do_later.pyr      s    zDoLaterTimer.__init__)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úrepeatr   Ú__classcell__r   r   r   r   r      s   r   c                 O   s   t jd| ||d�S )zç Does something 50 milliseconds from now.

    Parameters
    ----------
    callable : callable
        The callable to call in 50ms time.
    args, kwargs : tuple, dict
        Arguments to be passed through to the callable.
    gš™™™™™©?©r	   Úcallbackr   Úkwargs©r   Zsingle_shot)r
   r   r   r   r   r   Údo_later    s    
ÿr   c                 O   s   t j| d |||d�S )a³   Does something after some specified time interval.

    Parameters
    ----------
    interval : float
        The time interval in milliseconds to wait before calling.
    callable : callable
        The callable to call.
    args
        Positional arguments to be passed through to the callable.
    kwargs
        Keyword arguments to be passed through to the callable.
        Arguments to be passed through to the callable.
    g     @�@r   r   )r	   r
   r   r   r   r   r   Údo_after/   s    ÿr   N)Zpyface.timer.timerr   r   r   r   r   r   r   r   r   Ú<module>   s   