Switching more timeouts to second resolution
authorEd Page <eopage@byu.net>
Sun, 31 Jan 2010 02:18:20 +0000 (20:18 -0600)
committerEd Page <eopage@byu.net>
Sun, 31 Jan 2010 02:18:20 +0000 (20:18 -0600)
src/connection_manager.py
src/theonering.py

index dae1f40..92a12ae 100644 (file)
@@ -6,6 +6,7 @@ import telepathy
 import constants
 import tp
 import gtk_toolbox
 import constants
 import tp
 import gtk_toolbox
+import util.go_utils as gobject_utils
 import connection
 
 
 import connection
 
 
@@ -64,7 +65,7 @@ class TheOneRingConnectionManager(tp.ConnectionManager):
                Overrides tp.ConnectionManager
                """
                result = tp.ConnectionManager.disconnected(self, conn)
                Overrides tp.ConnectionManager
                """
                result = tp.ConnectionManager.disconnected(self, conn)
-               gobject.timeout_add(5000, self._shutdown)
+               gobject_utils.timeout_add_seconds(5, self._shutdown)
 
        def quit(self):
                """
 
        def quit(self):
                """
index a3c30d9..1bc7436 100755 (executable)
@@ -34,7 +34,7 @@ import constants
 import connection_manager
 
 
 import connection_manager
 
 
-IDLE_TIMEOUT = 5000
+IDLE_TIMEOUT = 5
 
 
 def run_theonering(persist):
 
 
 def run_theonering(persist):
@@ -60,7 +60,7 @@ def run_theonering(persist):
        if persist:
                shutdown_callback = None
        else:
        if persist:
                shutdown_callback = None
        else:
-               gobject.timeout_add(IDLE_TIMEOUT, timeout_cb)
+               gobject_utils.timeout_add_seconds(IDLE_TIMEOUT, timeout_cb)
                shutdown_callback = quit
 
        signal.signal(signal.SIGTERM, quit)
                shutdown_callback = quit
 
        signal.signal(signal.SIGTERM, quit)