MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / enterabs

Method enterabs

tools/python-3.11.9-amd64/Lib/sched.py:62–76  ·  view source on GitHub ↗

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.

(self, time, priority, action, argument=(), kwargs=_sentinel)

Source from the content-addressed store, hash-verified

60 self._sequence_generator = count()
61
62 def enterabs(self, time, priority, action, argument=(), kwargs=_sentinel):
63 """Enter a new event in the queue at an absolute time.
64
65 Returns an ID for the event which can be used to remove it,
66 if necessary.
67
68 """
69 if kwargs is _sentinel:
70 kwargs = {}
71
72 with self._lock:
73 event = Event(time, priority, next(self._sequence_generator),
74 action, argument, kwargs)
75 heapq.heappush(self._queue, event)
76 return event # The ID
77
78 def enter(self, delay, priority, action, argument=(), kwargs=_sentinel):
79 """A variant that specifies the time as a relative time.

Callers 1

enterMethod · 0.95

Calls 1

EventClass · 0.70

Tested by

no test coverage detected