g_usleep is more portable than sleep()
---
 SpiceXPI/src/plugin/controller-unix.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/SpiceXPI/src/plugin/controller-unix.cpp 
b/SpiceXPI/src/plugin/controller-unix.cpp
index 743e00b..ddbd8c0 100644
--- a/SpiceXPI/src/plugin/controller-unix.cpp
+++ b/SpiceXPI/src/plugin/controller-unix.cpp
@@ -132,7 +132,7 @@ int SpiceController::Connect(const int nRetries)
     for (int i = 0; rc != 0 && i < nRetries; ++i)
     {
         rc = Connect();
-        sleep(sleep_time);
+        g_usleep(sleep_time * G_USEC_PER_SEC);
         ++sleep_time;
     }
 
-- 
1.8.1.4

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to