Public bug reported:

Currently in ./src/wakeup-timer-mainloop.cpp
the g_timeout_add_full function is used to call intervals:

        const auto now = m_clock->localtime();
        const auto difference_usec = 
g_date_time_difference(m_wakeup_time.get(), now.get());
        const guint interval_msec = std::abs(difference_usec) / 1000u;
        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,
                                           on_timeout,
                                           this,
                                           nullptr);
More information:
 
https://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html#g-timeout-add-full

The grouping of timers to fire at the same time results in a more power and CPU 
efficient behavior
That's why I would recommend to use:
   g_timeout_add_seconds_full ()
instead

** Affects: indicator-datetime (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1533911

Title:
  Decrease CPU usage of datetime by events

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/indicator-datetime/+bug/1533911/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to