diff options
author | Patrick Venture <venture@google.com> | 2018-08-31 11:55:55 -0700 |
---|---|---|
committer | Patrick Venture <venture@google.com> | 2018-09-07 23:45:41 +0000 |
commit | 0b02be925a29357f69abbc9e9a58e7c5aaed2eab (patch) | |
tree | c1b39f817d98ffda7b987f9e3f864f576e3bf9ea /timer.cpp | |
parent | 26f80ab2cc41deadc913190d906f71266c4ed224 (diff) | |
download | phosphor-host-ipmid-0b02be925a29357f69abbc9e9a58e7c5aaed2eab.tar.gz phosphor-host-ipmid-0b02be925a29357f69abbc9e9a58e7c5aaed2eab.zip |
add .clang-format
Change-Id: I7c2a527b4751a560703a61fcbe9638b150546af5
Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'timer.cpp')
-rw-r--r-- | timer.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -1,6 +1,7 @@ +#include "timer.hpp" + #include <chrono> #include <phosphor-logging/log.hpp> -#include "timer.hpp" namespace phosphor { namespace ipmi @@ -27,7 +28,7 @@ void Timer::initialize() if (r < 0) { log<level::ERR>("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<level::ERR>("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<Timer*>(userData); timer->expired = true; log<level::INFO>("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<level::ERR>("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<level::ERR>("Failure to start timer", - entry("ERROR=%s", strerror(-r))); + entry("ERROR=%s", strerror(-r))); } return r; } |