Use g_timeout_add_seconds() for power efficiency
This attempts to align second-granularity wakeups across the system, reducing CPU wakeups a little. I considered all timeouts of duration 1 second or greater, and moved the non-timing-critical ones to g_timeout_add_seconds(). (Actually, I didn't find any that I felt were timing-critical)
This commit is contained in:
@@ -184,8 +184,8 @@ class ActivityToolbar(gtk.Toolbar):
|
||||
|
||||
def __title_changed_cb(self, entry):
|
||||
if not self._update_title_sid:
|
||||
self._update_title_sid = gobject.timeout_add(
|
||||
1000, self.__update_title_cb)
|
||||
self._update_title_sid = gobject.timeout_add_seconds(
|
||||
1, self.__update_title_cb)
|
||||
|
||||
def __update_title_cb(self):
|
||||
title = self.title.get_text()
|
||||
|
||||
Reference in New Issue
Block a user