interfaces: add equality operator for ReadReturn
Comparing ReadReturns where we have perfect knowledge should just use
an equality operation.
Change-Id: I93ee5d911e2e1f15330734031666edb2c9ef5457
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/interfaces.hpp b/interfaces.hpp
index 8e7fc0b..c16d19e 100644
--- a/interfaces.hpp
+++ b/interfaces.hpp
@@ -6,6 +6,10 @@
struct ReadReturn {
double value;
std::chrono::high_resolution_clock::time_point updated;
+
+ bool operator==(const ReadReturn &rhs) const {
+ return (this->value == rhs.value && this->updated == rhs.updated);
+ }
};