Home | History | Annotate | Download | only in python2.7

Lines Matching full:time

8 supposed to return the current time, one that is supposed to
9 implement a delay. You can implement real-time scheduling by
10 substituting time and sleep from built-in module time, or you can
11 implement simulated time by writing your own functions. This can
13 function is allowed to modify the queue. Time can be expressed as
16 Events are specified by tuples (time, priority, action, argument).
29 # XXX the global state of your particular time and delay functions.
36 Event = namedtuple('Event', 'time, priority, action, argument')
40 """Initialize a new instance, passing the time and delay
46 def enterabs(self, time, priority, action, argument):
47 """Enter a new event in the queue at an absolute time.
53 event = Event(time, priority, action, argument)
58 """A variant that specifies the time as a relative time.
63 time = self.timefunc() + delay
64 return self.enterabs(time, priority, action, argument)
108 time, priority, action, argument = checked_event = q[0]
110 if now < time:
111 delayfunc(time - now)
127 time, priority, action, arguments
131 # With heapq, two events scheduled at the same time will show in