util: Fix rescheduling and add test case.
Change-Id: Ic04a590a116083391b441338eed9a121e14852dd
diff --git a/src/util/time.hpp b/src/util/time.hpp
index d175964..9af95fc 100644
--- a/src/util/time.hpp
+++ b/src/util/time.hpp
@@ -160,6 +160,13 @@
int64_t m_value;
};
+inline std::ostream&
+operator<<(std::ostream &os, const Duration& duration)
+{
+ os << static_cast<int64_t>(duration) / 1000000000.0 << " s";
+ return os;
+}
+
/**
* \brief Get current time
* \return{ the current time in monotonic clock }