From 1cfc2f11b13412a15f8478cebc35e50e6feb13a2 Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Fri, 19 Oct 2018 17:29:46 -0700 Subject: Switch sd_event loops to sdeventplus This change is mostly focused around plumbing the sdeventplus::Event object everywhere and using the member functions provided for the event. No migration to the timer utility is performed yet. Change-Id: I912ab82bc081239d3b7c3cf7c5caca6742ef9c87 Signed-off-by: William A. Kennington III --- timer.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'timer.cpp') diff --git a/timer.cpp b/timer.cpp index 6929717..36057ab 100644 --- a/timer.cpp +++ b/timer.cpp @@ -32,16 +32,15 @@ using namespace phosphor::logging; using InternalFailure = sdbusplus::xyz::openbmc_project::Common:: Error::InternalFailure; -Timer::Timer(phosphor::fan::event::EventPtr& events, +Timer::Timer(const sdeventplus::Event& event, std::function callbackFunc) : - timeEvent(events), callback(callbackFunc), timeout(0) { sd_event_source* source = nullptr; // Start with an infinite expiration time - auto r = sd_event_add_time(timeEvent.get(), + auto r = sd_event_add_time(event.get(), &source, CLOCK_MONOTONIC, // Time base UINT64_MAX, // Expire time - way long time -- cgit v1.2.1