summaryrefslogtreecommitdiffstats
path: root/control/actions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'control/actions.cpp')
-rw-r--r--control/actions.cpp25
1 files changed, 1 insertions, 24 deletions
diff --git a/control/actions.cpp b/control/actions.cpp
index 923b1cc..0267c10 100644
--- a/control/actions.cpp
+++ b/control/actions.cpp
@@ -33,30 +33,7 @@ Action call_actions_based_on_timer(TimerConf&& tConf,
zone.findTimer(group, actions) ==
std::end(zone.getTimerEvents()))
{
- // Associate event data with timer
- std::unique_ptr<EventData> eventData =
- std::make_unique<EventData>(
- group,
- "",
- nullptr,
- actions
- );
- // Create/start timer and associate event data with it
- std::unique_ptr<util::Timer> timer =
- std::make_unique<util::Timer>(
- zone.getEventLoop(),
- [&zone,
- actions = &actions,
- group = &group]()
- {
- zone.timerExpired(*group, *actions);
- });
- if (!timer->running())
- {
- timer->start(std::get<intervalPos>(tConf),
- std::get<typePos>(tConf));
- }
- zone.addTimer(std::move(eventData), std::move(timer));
+ zone.addTimer(group, actions, tConf);
}
else
{
OpenPOWER on IntegriCloud