File: //usr/local/lib/python3.9/site-packages/kombu/asynchronous/__pycache__/timer.cpython-39.pyc
a
X>h
� @ s* d Z ddlmZ ddlZddlZddlmZ ddlmZ ddlm Z ddl
mZ ddl
m
Z dd l
mZ dd
lmZ ddlmZ ddlmZ ejd
kr�ddlmZ nddlmZ er�ddlmZ dZee�ZdZe� ded��Z!e"ed�Z#edd�Z$ed�efdd�Z%e G dd� d��Z&G dd� d�Z'dS )z"Timer scheduling Python callbacks.� )�annotationsN)�
namedtuple)�datetime)�total_ordering)� monotonic)�time)�
TYPE_CHECKING)�proxy)�wraps)�
get_logger)� � )�ZoneInfo)�
TracebackType)�Entry�Timer�to_timestamp� �UTC�pypy_version_info� scheduled)�eta�priority�entryc C sF t | t�rB| jdu r | j|d�} t� |� }t| t �� | d�S | S )z^Convert datetime to timestamp.
If d' is already a timestamp, then that will be used.
N)�tzinfor )�
isinstancer r �replace�_time�max�EPOCH�
total_seconds)�dZdefault_timezoner �diff� r# �B/usr/local/lib/python3.9/site-packages/kombu/asynchronous/timer.pyr &