Server : Apache System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64 User : nobody ( 99) PHP Version : 8.1.23 Disable Function : NONE Directory : /opt/alt/python38/lib64/python3.8/__pycache__/ |
U ��,a* � @ s� d Z ddlZddlZddlmZ ddlZddlmZ dgZG dd� dedd��Z d e j_ d e j _ de j_ de j_ d e j _ e� ZG dd� d�ZdS )a� A generally useful event scheduler class. Each instance of this class manages its own queue. No multi-threading is implied; you are supposed to hack that yourself, or use a single instance per application. Each instance is parametrized with two functions, one that is supposed to return the current time, one that is supposed to implement a delay. You can implement real-time scheduling by substituting time and sleep from built-in module time, or you can implement simulated time by writing your own functions. This can also be used to integrate scheduling with STDWIN events; the delay function is allowed to modify the queue. Time can be expressed as integers or floating point numbers, as long as it is consistent. Events are specified by tuples (time, priority, action, argument, kwargs). As in UNIX, lower priority numbers mean higher priority; in this way the queue can be maintained as a priority queue. Execution of the event means calling the action function, passing it the argument sequence in "argument" (remember that in Python, multiple function arguments are be packed in a sequence) and keyword parameters in "kwargs". The action function may be an instance method so it has another way to reference private data (besides global variables). � N)� namedtuple)� monotonic� schedulerc @ s8 e Zd Zg Zdd� Zdd� Zdd� Zdd� Zd d � ZdS )�Eventc C s | j | jf|j |jfkS �N��time�priority��s�o� r �*/opt/alt/python38/lib64/python3.8/sched.py�__eq__$ � zEvent.__eq__c C s | j | jf|j |jfk S r r r r r r �__lt__% r zEvent.__lt__c C s | j | jf|j |jfkS r r r r r r �__le__&