aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/datetime/wakeup-timer.h2
-rw-r--r--src/alarm-queue-simple.cpp4
-rw-r--r--src/wakeup-timer-mainloop.cpp9
-rw-r--r--src/wakeup-timer-uha.cpp13
4 files changed, 14 insertions, 14 deletions
diff --git a/include/datetime/wakeup-timer.h b/include/datetime/wakeup-timer.h
index b84d347..0a9923c 100644
--- a/include/datetime/wakeup-timer.h
+++ b/include/datetime/wakeup-timer.h
@@ -33,7 +33,7 @@ namespace datetime {
***/
/**
- * \brief A one-shot timer that emits a signal when the timeout is reached
+ * \brief A one-shot timer that emits a signal when its timeout is reached.
*/
class WakeupTimer
{
diff --git a/src/alarm-queue-simple.cpp b/src/alarm-queue-simple.cpp
index 2fd289c..1c871bf 100644
--- a/src/alarm-queue-simple.cpp
+++ b/src/alarm-queue-simple.cpp
@@ -48,13 +48,13 @@ SimpleAlarmQueue::SimpleAlarmQueue(const std::shared_ptr<Clock>& clock,
const bool clock_jumped = std::abs(now - m_time) > skew_threshold_usec;
m_time = now;
if (clock_jumped) {
- g_message("AlarmQueue %p calling requeue() due to clock skew", this);
+ g_debug("AlarmQueue %p calling requeue() due to clock skew", this);
requeue();
}
});
m_timer->timeout().connect([this](){
- g_message("AlarmQueue %p calling requeue() due to timeout", this);
+ g_debug("AlarmQueue %p calling requeue() due to timeout", this);
requeue();
});
diff --git a/src/wakeup-timer-mainloop.cpp b/src/wakeup-timer-mainloop.cpp
index 53dd684..dfef037 100644
--- a/src/wakeup-timer-mainloop.cpp
+++ b/src/wakeup-timer-mainloop.cpp
@@ -64,9 +64,10 @@ private:
const auto now = m_clock->localtime();
const auto difference_usec = g_date_time_difference(m_wakeup_time.get(), now.get());
const guint interval_msec = (guint)difference_usec / 1000u;
- g_message("setting wakeup timer to kick at %s, which is in %zu seconds",
- m_wakeup_time.format("%F %T").c_str(),
- size_t{interval_msec/1000});
+ g_debug("%s setting wakeup timer to kick at %s, which is in %zu seconds",
+ G_STRFUNC,
+ m_wakeup_time.format("%F %T").c_str(),
+ size_t{interval_msec/1000});
m_timeout_tag = g_timeout_add_full(G_PRIORITY_HIGH,
interval_msec,
@@ -77,7 +78,7 @@ private:
static gboolean on_timeout(gpointer gself)
{
- g_message("%s %s", G_STRLOC, G_STRFUNC);
+ g_debug("%s %s", G_STRLOC, G_STRFUNC);
static_cast<Impl*>(gself)->on_timeout();
return G_SOURCE_REMOVE;
}
diff --git a/src/wakeup-timer-uha.cpp b/src/wakeup-timer-uha.cpp
index dda109f..b634f52 100644
--- a/src/wakeup-timer-uha.cpp
+++ b/src/wakeup-timer-uha.cpp
@@ -68,16 +68,15 @@ public:
void set_wakeup_time(const DateTime& d)
{
- g_message("%s %s", G_STRLOC, G_STRFUNC);
+ g_debug("%s %s", G_STRLOC, G_STRFUNC);
std::lock_guard<std::recursive_mutex> lg(m_mutex);
- g_message("%s setting hardware wakeup time to %s", G_STRFUNC, d.format("%F %T").c_str());
-
const auto diff_usec = d - m_clock->localtime();
struct timespec ts;
ts.tv_sec = diff_usec / G_USEC_PER_SEC;
ts.tv_nsec = (diff_usec % G_USEC_PER_SEC) * 1000;
- g_message("%s setting hardware alarm to kick %zu seconds from now", G_STRFUNC, (size_t)ts.tv_sec);
+ g_debug("%s setting hardware wakeup time to %s (%zu seconds from now)",
+ G_STRFUNC, (size_t)ts.tv_sec, d.format("%F %T").c_str());
u_hardware_alarm_set_relative_to_with_behavior(m_hardware_alarm,
U_HARDWARE_ALARM_TIME_REFERENCE_NOW,
U_HARDWARE_ALARM_SLEEP_BEHAVIOR_WAKEUP_DEVICE,
@@ -144,9 +143,9 @@ UhaWakeupTimer::~UhaWakeupTimer()
bool UhaWakeupTimer::is_supported()
{
- auto foo = u_hardware_alarm_create();
- g_message ("%s hardware alarm %p", G_STRFUNC, foo);
- return foo != nullptr;
+ auto hw_alarm = u_hardware_alarm_create();
+ g_debug ("%s hardware alarm %p", G_STRFUNC, hw_alarm);
+ return hw_alarm != nullptr;
}
void UhaWakeupTimer::set_wakeup_time(const DateTime& d)