diff options
-rw-r--r-- | include/datetime/alarm-queue-simple.h | 2 | ||||
-rw-r--r-- | src/alarm-queue-simple.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/datetime/alarm-queue-simple.h b/include/datetime/alarm-queue-simple.h index 8461227..af1145a 100644 --- a/include/datetime/alarm-queue-simple.h +++ b/include/datetime/alarm-queue-simple.h @@ -52,7 +52,7 @@ private: const std::shared_ptr<Planner> m_planner; const std::shared_ptr<WakeupTimer> m_timer; core::Signal<const Appointment&> m_alarm_reached; - DateTime m_time; + DateTime m_datetime; }; diff --git a/src/alarm-queue-simple.cpp b/src/alarm-queue-simple.cpp index 1c871bf..00608c9 100644 --- a/src/alarm-queue-simple.cpp +++ b/src/alarm-queue-simple.cpp @@ -35,7 +35,7 @@ SimpleAlarmQueue::SimpleAlarmQueue(const std::shared_ptr<Clock>& clock, m_clock(clock), m_planner(planner), m_timer(timer), - m_time(clock->localtime()) + m_datetime(clock->localtime()) { m_planner->appointments().changed().connect([this](const std::vector<Appointment>&){ g_debug("AlarmQueue %p calling requeue() due to appointments changed", this); @@ -45,8 +45,8 @@ SimpleAlarmQueue::SimpleAlarmQueue(const std::shared_ptr<Clock>& clock, m_clock->minute_changed.connect([=]{ const auto now = m_clock->localtime(); constexpr auto skew_threshold_usec = int64_t{90} * G_USEC_PER_SEC; - const bool clock_jumped = std::abs(now - m_time) > skew_threshold_usec; - m_time = now; + const bool clock_jumped = std::abs(now - m_datetime) > skew_threshold_usec; + m_datetime = now; if (clock_jumped) { g_debug("AlarmQueue %p calling requeue() due to clock skew", this); requeue(); |