summaryrefslogtreecommitdiffstats
path: root/softoff/timer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'softoff/timer.cpp')
-rw-r--r--softoff/timer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/softoff/timer.cpp b/softoff/timer.cpp
index c626536..4e8fd9a 100644
--- a/softoff/timer.cpp
+++ b/softoff/timer.cpp
@@ -51,6 +51,12 @@ int Timer::timeoutHandler(sd_event_source* eventSource,
auto timer = static_cast<Timer*>(userData);
timer->expired = true;
+ // Call optional user call back function if available
+ if(timer->userCallBack)
+ {
+ timer->userCallBack();
+ }
+
log<level::INFO>("Timer expired");
return 0;
}
OpenPOWER on IntegriCloud