From 2937a09ead08858a6bb4176ecafb4c1bf7dff735 Mon Sep 17 00:00:00 2001 From: Daniel Drake Date: Sat, 06 Dec 2008 21:29:39 +0000 Subject: 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) --- (limited to 'src/sugar/graphics/alert.py') 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 -- cgit v0.9.1