diff options
Diffstat (limited to 'src/wakeup-timer-uha.cpp')
-rw-r--r-- | src/wakeup-timer-uha.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
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) |