timer: Remove in favor of sdeventplus/timer

This change removes the ad-hoc timer implementation and uses the common
one that comes with sdeventplus.

Tested: Compiled

Change-Id: Id3b7e464a472a7421785601634af58f681ebd3a6
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/power-sequencer/pgood_monitor.cpp b/power-sequencer/pgood_monitor.cpp
index b9995c6..29382c9 100644
--- a/power-sequencer/pgood_monitor.cpp
+++ b/power-sequencer/pgood_monitor.cpp
@@ -83,7 +83,7 @@
 
     //The pgood-wait service (with a longer timeout)
     //will handle powering off the system.
-    event.exit(EXIT_SUCCESS);
+    timer.get_event().exit(EXIT_SUCCESS);
 }
 
 void PGOODMonitor::propertyChanged()
@@ -93,7 +93,7 @@
     if (!pgoodPending())
     {
         //PGOOD is on, or system is off, so we are done.
-        event.exit(EXIT_SUCCESS);
+        timer.get_event().exit(EXIT_SUCCESS);
     }
 }
 
@@ -121,8 +121,7 @@
             return EXIT_SUCCESS;
         }
 
-        timer.start(interval);
-        return event.loop();
+        return timer.get_event().loop();
     }
     catch (std::exception& e)
     {
diff --git a/power-sequencer/pgood_monitor.hpp b/power-sequencer/pgood_monitor.hpp
index 14a2735..ec8e05e 100644
--- a/power-sequencer/pgood_monitor.hpp
+++ b/power-sequencer/pgood_monitor.hpp
@@ -5,7 +5,6 @@
 #include <sdeventplus/event.hpp>
 #include "device.hpp"
 #include "device_monitor.hpp"
-#include "timer.hpp"
 
 namespace witherspoon
 {
diff --git a/power-sequencer/runtime_monitor.cpp b/power-sequencer/runtime_monitor.cpp
index 9bfeaf0..514ba8f 100644
--- a/power-sequencer/runtime_monitor.cpp
+++ b/power-sequencer/runtime_monitor.cpp
@@ -43,7 +43,7 @@
 
     try
     {
-        timer.stop();
+        timer.setEnabled(false);
 
 #ifdef UCD90160_DEVICE_ACCESS
         device->onFailure();
diff --git a/power-sequencer/runtime_monitor.hpp b/power-sequencer/runtime_monitor.hpp
index d37cdc0..fb3dcb1 100644
--- a/power-sequencer/runtime_monitor.hpp
+++ b/power-sequencer/runtime_monitor.hpp
@@ -5,7 +5,6 @@
 #include <sdeventplus/event.hpp>
 #include "device.hpp"
 #include "device_monitor.hpp"
-#include "timer.hpp"
 
 namespace witherspoon
 {