mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-19 23:20:57 +01:00
Add a heapify because our modifications don't guarantee that the heap property is preserved.
This commit is contained in:
parent
bea41b308a
commit
07585182af
@ -90,6 +90,7 @@ class Schedule(drivers.IrcDriver):
|
|||||||
"""Removes the event with the given name from the schedule."""
|
"""Removes the event with the given name from the schedule."""
|
||||||
del self.events[name]
|
del self.events[name]
|
||||||
self.schedule = [(t, n) for (t, n) in self.schedule if n != name]
|
self.schedule = [(t, n) for (t, n) in self.schedule if n != name]
|
||||||
|
heapq.heapify(self.schedule)
|
||||||
|
|
||||||
def addPeriodicEvent(self, f, t, name=None):
|
def addPeriodicEvent(self, f, t, name=None):
|
||||||
"""Adds a periodic event that is called every t seconds."""
|
"""Adds a periodic event that is called every t seconds."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user