aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/main.cpp b/src/main.cpp
index eb90020..48d3d20 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -31,13 +31,9 @@
#include <datetime/state.h>
#include <datetime/timezone-file.h>
#include <datetime/timezones-live.h>
-#include <datetime/wakeup-timer-mainloop.h>
+#include <datetime/wakeup-timer-powerd.h>
#include <notifications/notifications.h>
-#ifdef HAVE_UBUNTU_HW_ALARM_H
- #include <datetime/wakeup-timer-uha.h>
-#endif
-
#include <glib/gi18n.h> // bindtextdomain()
#include <gio/gio.h>
@@ -66,20 +62,6 @@ namespace
return engine;
}
- std::shared_ptr<WakeupTimer> create_wakeup_timer(const std::shared_ptr<Clock>& clock)
- {
- std::shared_ptr<WakeupTimer> wakeup_timer;
-
-#ifdef HAVE_UBUNTU_HW_ALARM_H
- if (UhaWakeupTimer::is_supported()) // prefer to use the platform API
- wakeup_timer = std::make_shared<UhaWakeupTimer>(clock);
- else
-#endif
- wakeup_timer = std::make_shared<MainloopWakeupTimer>(clock);
-
- return wakeup_timer;
- }
-
std::shared_ptr<State> create_state(const std::shared_ptr<Engine>& engine,
const std::shared_ptr<Timezone>& tz)
{
@@ -120,7 +102,7 @@ namespace
upcoming_planner->date().set(now);
});
- auto wakeup_timer = create_wakeup_timer(clock);
+ auto wakeup_timer = std::make_shared<PowerdWakeupTimer>(clock);
return std::make_shared<SimpleAlarmQueue>(clock, upcoming_planner, wakeup_timer);
}
}