Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/jarabe/model
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2008-12-06 21:42:19 (GMT)
committer Daniel Drake <dsd@laptop.org>2008-12-06 21:48:51 (GMT)
commit958504b1ca5760ec263e72f69787e9cd5afc7118 (patch)
treed841902df962a71bb74a30ad0f382801b8cae93f /src/jarabe/model
parent8c8b205fdf23accfaade79b9162812d5c59b30a9 (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().
Diffstat (limited to 'src/jarabe/model')
-rw-r--r--src/jarabe/model/shell.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/jarabe/model/shell.py b/src/jarabe/model/shell.py
index fe3ad36..9f6a51f 100644
--- a/src/jarabe/model/shell.py
+++ b/src/jarabe/model/shell.py
@@ -539,7 +539,8 @@ class ShellModel(gobject.GObject):
# FIXME: better learn about finishing processes by receiving a signal.
# Now just check whether an activity has a window after ~90sec
- gobject.timeout_add(90000, self._check_activity_launched, activity_id)
+ gobject.timeout_add_seconds(90, self._check_activity_launched,
+ activity_id)
def notify_launch_failed(self, activity_id):
home_activity = self.get_activity_by_id(activity_id)