summaryrefslogtreecommitdiffstats
path: root/control/types.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'control/types.hpp')
-rw-r--r--control/types.hpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/control/types.hpp b/control/types.hpp
index 967b0b4..239d00d 100644
--- a/control/types.hpp
+++ b/control/types.hpp
@@ -3,7 +3,8 @@
#include <tuple>
#include <vector>
#include <sdbusplus/server.hpp>
-#include "timer.hpp"
+#include <sdeventplus/clock.hpp>
+#include <sdeventplus/utility/timer.hpp>
namespace phosphor
{
@@ -64,7 +65,11 @@ using Service = std::tuple<std::string, bool>;
constexpr auto intervalPos = 0;
constexpr auto typePos = 1;
-using TimerType = phosphor::fan::util::Timer::TimerType;
+enum class TimerType
+{
+ oneshot,
+ repeating,
+};
using TimerConf = std::tuple<std::chrono::seconds,
TimerType>;
@@ -89,9 +94,8 @@ using EventData = std::tuple<Group, std::string, Handler, std::vector<Action>>;
constexpr auto timerEventDataPos = 0;
constexpr auto timerTimerPos = 1;
-using TimerEvent =
- std::tuple<std::unique_ptr<EventData>,
- std::unique_ptr<phosphor::fan::util::Timer>>;
+using Timer = sdeventplus::utility::Timer<sdeventplus::ClockId::Monotonic>;
+using TimerEvent = std::tuple<std::unique_ptr<EventData>, Timer>;
constexpr auto signalEventDataPos = 0;
constexpr auto signalMatchPos = 1;
OpenPOWER on IntegriCloud