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/device_monitor.hpp b/device_monitor.hpp
index 3214afb..0813737 100644
--- a/device_monitor.hpp
+++ b/device_monitor.hpp
@@ -2,8 +2,8 @@
 #include <phosphor-logging/log.hpp>
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/server.hpp>
+#include <sdeventplus/event.hpp>
 #include "device.hpp"
-#include "event.hpp"
 #include "timer.hpp"
 
 namespace witherspoon
@@ -39,7 +39,7 @@
          * @param[in] i - polling interval in ms
          */
         DeviceMonitor(std::unique_ptr<Device>&& d,
-                      event::Event& e,
+                      const sdeventplus::Event& e,
                       std::chrono::milliseconds i) :
             device(std::move(d)),
             event(e),
@@ -57,15 +57,7 @@
         virtual int run()
         {
             timer.start(interval, Timer::TimerType::repeating);
-
-            auto r = sd_event_loop(event.get());
-            if (r < 0)
-            {
-                log<level::ERR>("sd_event_loop() failed",
-                                entry("ERROR=%s", strerror(-r)));
-            }
-
-            return r;
+            return event.loop();
         }
 
     protected:
@@ -88,9 +80,9 @@
         std::unique_ptr<Device> device;
 
         /**
-         * The sd_event structure used by the timer
+         * The event loop used by the timer
          */
-        event::Event& event;
+        sdeventplus::Event event;
 
         /**
          * The polling interval in milliseconds