From 1010b5b99db644cb0b08a7d6722384cb33cae3f2 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Mon, 8 Feb 2021 13:20:17 +0100 Subject: [PATCH 215/310] tools/sched/schedgraph.py: implement __lt__ for EventSource so sorting works. XXX: is coparing y correct? Obtained from: ElectroBSD --- tools/sched/schedgraph.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/sched/schedgraph.py b/tools/sched/schedgraph.py index bfd4339f6633..f7d8b2d4b632 100644 --- a/tools/sched/schedgraph.py +++ b/tools/sched/schedgraph.py @@ -817,6 +817,9 @@ def __eq__(self, other): return False return self.group == other.group and self.name == other.name + def __lt__(self, other): + return self.y < other.y + # It is much faster to append items to a list then to insert them # at the beginning. As a result, we add events in reverse order # and then swap the list during fixup. -- 2.37.1