summaryrefslogtreecommitdiffstats
path: root/monitor/fan.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'monitor/fan.cpp')
-rw-r--r--monitor/fan.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/monitor/fan.cpp b/monitor/fan.cpp
index 054c67d..a2e0386 100644
--- a/monitor/fan.cpp
+++ b/monitor/fan.cpp
@@ -27,7 +27,6 @@ namespace monitor
{
using namespace phosphor::logging;
-using TimerType = phosphor::fan::util::Timer::TimerType;
constexpr auto INVENTORY_PATH = "/xyz/openbmc_project/inventory";
constexpr auto INVENTORY_INTF = "xyz.openbmc_project.Inventory.Manager";
@@ -90,8 +89,7 @@ void Fan::tachChanged()
void Fan::tachChanged(TachSensor& sensor)
{
- auto& timer = sensor.getTimer();
- auto running = timer.running();
+ auto running = sensor.timerRunning();
//If this sensor is out of range at this moment, start
//its timer, at the end of which the inventory
@@ -103,7 +101,7 @@ void Fan::tachChanged(TachSensor& sensor)
{
if (sensor.functional() && !running)
{
- timer.start(sensor.getTimeout(), TimerType::oneshot);
+ sensor.startTimer();
}
}
else
@@ -115,7 +113,7 @@ void Fan::tachChanged(TachSensor& sensor)
if (running)
{
- timer.stop();
+ sensor.stopTimer();
}
//If the fan was nonfunctional and enough sensors are now OK,
OpenPOWER on IntegriCloud