event: Remove in favor of sdeventplus
Use the new library provided to all openbmc projects instead of rolling
our own managed pointer.
Tested: Compiled
Change-Id: I4993d4340e0e0aa5898e73ef815baa81b0e8a2bc
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/timer.hpp b/timer.hpp
index 0f46de7..600fe42 100644
--- a/timer.hpp
+++ b/timer.hpp
@@ -3,7 +3,8 @@
#include <chrono>
#include <functional>
#include <memory>
-#include "event.hpp"
+#include <sdeventplus/event.hpp>
+#include <systemd/sd-event.h>
namespace witherspoon
{
@@ -44,10 +45,10 @@
/**
* @brief Constructs timer object
*
- * @param[in] events - sd_event pointer, previously created
+ * @param[in] event - sd_event pointer, previously created
* @param[in] callbackFunc - The function to call on timer expiration
*/
- Timer(event::Event& events,
+ Timer(const sdeventplus::Event& event,
std::function<void()> callbackFunc);
/**
@@ -130,14 +131,9 @@
void setTimeout();
/**
- * @brief The sd_event structure
- */
- event::Event& timeEvent;
-
- /**
* @brief Source of events
*/
- event::EventSource eventSource;
+ sd_event_source* eventSource;
/**
* @brief Either 'repeating' or 'oneshot'