Add simulated version of the event loop
Change-Id: Id61ae7e72d71a52c59497ba13caa6f8267abec34
diff --git a/aos/events/raw-event-loop.h b/aos/events/raw-event-loop.h
index 5a0df1e..9b1408d 100644
--- a/aos/events/raw-event-loop.h
+++ b/aos/events/raw-event-loop.h
@@ -83,6 +83,14 @@
info.queue_length = T::kQueueLength;
return info;
}
+
+ // Necessary for the comparison of QueueTypeInfo objects in the
+ // SimulatedEventLoop.
+ bool operator<(const QueueTypeInfo &other) const {
+ if (size != other.size) return size < other.size;
+ if (hash != other.hash) return hash < other.hash;
+ return queue_length < other.queue_length;
+ }
};
// Interface for timers