Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/sugar/graphics/alert.py
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2008-12-06 21:29:39 (GMT)
committer Daniel Drake <dsd@laptop.org>2008-12-18 19:56:08 (GMT)
commit2937a09ead08858a6bb4176ecafb4c1bf7dff735 (patch)
treecaabd26787e1237146cf1d80149bf12c0aaefe3c /src/sugar/graphics/alert.py
parent96da9d490ef18fa35893314d4d2b6ee75de0767a (diff)
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)
Diffstat (limited to 'src/sugar/graphics/alert.py')
-rw-r--r--src/sugar/graphics/alert.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sugar/graphics/alert.py b/src/sugar/graphics/alert.py
index 6cfa0fa..2c3c4ca 100644
--- a/src/sugar/graphics/alert.py
+++ b/src/sugar/graphics/alert.py
@@ -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