Remove timer in favor of sdeventplus/utility/timer
This removes the custom timer implementation and moves to the
sdeventplus utility. Functionally this should make no change
Tested:
Built and run through the unit test suite.
Change-Id: Ib7ee90d489d5db72496aaaca91c3cf5490ad47d6
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/control/zone.hpp b/control/zone.hpp
index d01e972..9c85655 100644
--- a/control/zone.hpp
+++ b/control/zone.hpp
@@ -1,14 +1,12 @@
#pragma once
+#include <algorithm>
#include <cassert>
#include <chrono>
-#include <vector>
-#include <cassert>
-#include <algorithm>
#include <sdbusplus/bus.hpp>
#include <sdeventplus/event.hpp>
+#include <vector>
#include "fan.hpp"
#include "types.hpp"
-#include "timer.hpp"
namespace phosphor
{
@@ -423,9 +421,6 @@
*/
inline void removeTimer(std::vector<TimerEvent>::iterator& teIter)
{
- assert(teIter != std::end(_timerEvents));
- std::get<timerEventDataPos>(*teIter).reset();
- std::get<timerTimerPos>(*teIter).reset();
_timerEvents.erase(teIter);
}
@@ -547,12 +542,12 @@
/**
* The increase timer object
*/
- phosphor::fan::util::Timer _incTimer;
+ Timer _incTimer;
/**
* The decrease timer object
*/
- phosphor::fan::util::Timer _decTimer;
+ Timer _decTimer;
/**
* Event loop used on set speed event timers