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:
Daniel Drake
2008-12-06 21:29:39 +00:00
parent 96da9d490e
commit 2937a09ead
6 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -376,7 +376,7 @@ class TimeoutAlert(Alert):
canvas.show()
self.add_button(gtk.RESPONSE_OK, _('Continue'), canvas)
gobject.timeout_add(1000, self.__timeout)
gobject.timeout_add_seconds(1, self.__timeout)
def __timeout(self):
self._timeout -= 1