grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026+ ÒÅéø-Y­ãóL€Rt^RIt^RIt^RIHt^RIHt^RIt^RIHt R.t ]!RR4t R] PnR ] PnR ] PnR ] PnR ] PnR ] P n]!4t!RR4tR#)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)Úcount)Ú monotonicÚ schedulerÚEventz2time, priority, sequence, action, argument, kwargszaNumeric type compatible with the return value of the timefunc function passed to the constructor.zSEvents scheduled for the same time will be executed in the order of their priority.zbA continually increasing sequence number that separates events if time and priority are equal.z?Executing the event means executing action(*argument, **kwargs)zGargument is a sequence holding the positional arguments for the action.zDkwargs is a dictionary holding the keyword arguments for the action.có„a€]tRt^3to]]P 3RltR ]3Rlt R ]3Rlt Rt Rt R Rlt ]R4tRtVtR #) rc ó~€.Vn\P!4VnWnW n\ 4VnR#)z?Initialize a new instance, passing the time and delay functionsN)Ú_queueÚ threadingÚRLockÚ_lockÚtimefuncÚ delayfuncrÚ_sequence_generator)Úselfr rs&&&Ú,/opt/alt/python314/lib64/python3.14/sched.pyÚ__init__Úscheduler.__init__5s-€ðˆŒ Ü—_’_Ó&ˆŒ Ø Œ Ø"ŒÜ#(£7ˆÖ óc  ó€V\Jd/pVP;_uu_4\W\VP4W4V4p\ P !VPV4RRR4V# +'giX#;i)z€Enter a new event in the queue at an absolute time. Returns an ID for the event which can be used to remove it, if necessary. N)Ú _sentinelr rÚnextrÚheapqÚheappushr )rÚtimeÚpriorityÚactionÚargumentÚkwargsÚevents&&&&&& rÚenterabsÚscheduler.enterabs>se€ð ”YÓ ØˆFà �Z�Z‹Zܘ$¬$¨t×/GÑ/GÓ*HØ ¨Fó4ˆEä �NŠN˜4Ÿ;™;¨Ô .÷ðˆ ÷ ŽZðˆ ús ¡AA.Á. A? c óV€VP4V,pVPWbW4V4#)zkA variant that specifies the time as a relative time. This is actually the more commonly used interface. )r r )rÚdelayrrrrrs&&&&&& rÚenterÚscheduler.enterNs'€ð �}‰}‹ Õ&ˆØ�}‰}˜T¨V¸vÓFÐFrc óÞ€VP;_uu_4VPPV4\P!VP4RRR4R# +'giR#;i)z’Remove an event from the queue. This must be presented the ID as returned by enter(). If the event is not in the queue, this raises ValueError. N)r r ÚremoverÚheapify)rrs&&rÚcancelÚscheduler.cancelWs;€ð�Z�Z‹ZØ �K‰K× Ñ ˜uÔ %Ü �MŠM˜$Ÿ+™+Ô &÷�Z�ZŠZús •óö >r)Ú__doc__rrÚ collectionsrÚ itertoolsrr rrDÚ__all__rrr4rrrÚobjectrrr?rrÚrOs›ðñó2 Û Ý"ÝÛÝ#à ˆ-€á�7ÐPÓQ€ð0€‡ � Ôð#€‡�Ôð8€‡�Ôð€‡ � Ôð€‡�Ôð€‡ � Ôñ ‹H€ ÷t>ót>r