[sabayon] bgo#564405 - use gobject.timeout_add_seconds() where possible, to help with power consumption
- From: Federico Mena Quintero <federico src gnome org>
- To: svn-commits-list gnome org
- Subject: [sabayon] bgo#564405 - use gobject.timeout_add_seconds() where possible, to help with power consumption
- Date: Thu, 23 Apr 2009 13:08:39 -0400 (EDT)
commit bfefb624dc5791e7e5f86102c2437163cc5d292b
Author: Debarshi Ray <rishi gnu org>
Date: Thu Apr 23 11:46:09 2009 -0500
bgo#564405 - use gobject.timeout_add_seconds() where possible, to help with power consumption
Signed-off-by: Federico Mena Quintero <federico novell com>
---
lib/dirmonitor.py | 2 +-
lib/protosession.py | 4 ++--
lib/sources/filessource.py | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/dirmonitor.py b/lib/dirmonitor.py
index c1a4253..8c93dc7 100755
--- a/lib/dirmonitor.py
+++ b/lib/dirmonitor.py
@@ -192,7 +192,7 @@ def run_unit_tests ():
print ("Expected event: %s %s") % (path, event_to_string (event))
assert False
return True
- timeout = gobject.timeout_add (5 * 1000, should_not_be_reached, expected)
+ timeout = gobject.timeout_add_seconds (5, should_not_be_reached, expected)
monitor = DirectoryMonitor (temp_path, handle_change, (expected, main_loop))
monitor.set_directories_to_ignore (["bar"])
diff --git a/lib/protosession.py b/lib/protosession.py
index 2632d6c..1d5eea0 100644
--- a/lib/protosession.py
+++ b/lib/protosession.py
@@ -385,8 +385,8 @@ class ProtoSession (gobject.GObject):
io_watch = gobject.io_add_watch (self.usr1_pipe_r,
gobject.IO_IN | gobject.IO_PRI,
self.__usr1_pipe_watch_handler)
- timeout = gobject.timeout_add (XNEST_USR1_TIMEOUT * 1000,
- self.__usr1_timeout_handler)
+ timeout = gobject.timeout_add_seconds (XNEST_USR1_TIMEOUT,
+ self.__usr1_timeout_handler)
dprint ("Waiting on child process (%d)" % self.xnest_pid)
diff --git a/lib/sources/filessource.py b/lib/sources/filessource.py
index 53d97b9..d01182d 100755
--- a/lib/sources/filessource.py
+++ b/lib/sources/filessource.py
@@ -177,7 +177,7 @@ def run_unit_tests ():
def should_not_be_reached ():
assert False
return True
- timeout = gobject.timeout_add (60 * 1000, should_not_be_reached)
+ timeout = gobject.timeout_add_seconds (60, should_not_be_reached)
profile_path = os.path.join (os.getcwd (), "file-test.zip")
if os.path.exists (profile_path):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]