[pkg-fso-commits] [SCM] FSO frameworkd Debian packaging branch, master, updated. milestone4-368-g700ab82
Michael 'Mickey' Lauer
mickey at vanille-media.de
Mon Feb 2 18:51:59 UTC 2009
The following commit has been merged in the master branch:
commit bd724ab14eb698ac94e35f392b868a1b37983a3b
Author: Michael 'Mickey' Lauer <mickey at vanille-media.de>
Date: Fri Jan 16 17:50:53 2009 +0100
patterns/tasklet: use timeout_add_seconds to save energy
diff --git a/framework/patterns/tasklet.py b/framework/patterns/tasklet.py
index f65d38b..93040d4 100644
--- a/framework/patterns/tasklet.py
+++ b/framework/patterns/tasklet.py
@@ -400,7 +400,7 @@ class WaitDBusSignal(Tasklet):
self.err_callback = err_callback
self.connection = self.obj.connect_to_signal(self.event, self._callback)
if self.time_out:
- self.timeout_connection = gobject.timeout_add(self.time_out * 1000, self._err_callback)
+ self.timeout_connection = gobject.timeout_add_seconds(self.time_out, self._err_callback)
def close(self):
# Note : it is not working very well !!!! Why ? I don't know...
@@ -508,7 +508,7 @@ class Sleep(Tasklet):
super(Sleep, self).__init__()
self.time = time
def start(self, callback, err_callback, *args):
- self.event_id = gobject.timeout_add(self.time * 1000, callback, None, *args)
+ self.event_id = gobject.timeout_add_seconds(self.time, callback, None, *args)
def close(self):
# We cancel the event
gobject.source_remove(self.event_id)
--
FSO frameworkd Debian packaging
More information about the pkg-fso-commits
mailing list