From 0b02be925a29357f69abbc9e9a58e7c5aaed2eab Mon Sep 17 00:00:00 2001 From: Patrick Venture Date: Fri, 31 Aug 2018 11:55:55 -0700 Subject: add .clang-format Change-Id: I7c2a527b4751a560703a61fcbe9638b150546af5 Signed-off-by: Patrick Venture --- timer.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'timer.cpp') diff --git a/timer.cpp b/timer.cpp index 06965de..f1887fd 100644 --- a/timer.cpp +++ b/timer.cpp @@ -1,6 +1,7 @@ +#include "timer.hpp" + #include #include -#include "timer.hpp" namespace phosphor { namespace ipmi @@ -27,7 +28,7 @@ void Timer::initialize() if (r < 0) { log("Failure to set initial expiration time value", - entry("ERROR=%s", strerror(-r))); + entry("ERROR=%s", strerror(-r))); throw std::runtime_error("Timer initialization failed"); } @@ -37,7 +38,7 @@ void Timer::initialize() if (r < 0) { log("Failure to disable timer", - entry("ERROR=%s", strerror(-r))); + entry("ERROR=%s", strerror(-r))); throw std::runtime_error("Disabling the timer failed"); } @@ -45,15 +46,15 @@ void Timer::initialize() } /** @brief callback handler on timeout */ -int Timer::timeoutHandler(sd_event_source* eventSource, - uint64_t usec, void* userData) +int Timer::timeoutHandler(sd_event_source* eventSource, uint64_t usec, + void* userData) { auto timer = static_cast(userData); timer->expired = true; log("Timer expired"); // Call optional user call back function if available - if(timer->userCallBack) + if (timer->userCallBack) { timer->userCallBack(); } @@ -91,7 +92,7 @@ int Timer::startTimer(std::chrono::microseconds timeValue) if (r < 0) { log("Failure to set timer", - entry("ERROR=%s", strerror(-r))); + entry("ERROR=%s", strerror(-r))); return r; } @@ -101,7 +102,7 @@ int Timer::startTimer(std::chrono::microseconds timeValue) if (r < 0) { log("Failure to start timer", - entry("ERROR=%s", strerror(-r))); + entry("ERROR=%s", strerror(-r))); } return r; } -- cgit v1.2.1