summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2013-02-27 16:56:33 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2013-03-14 11:10:08 +0100
commit5e5ab9cb8b1bd22c18ce3894686dba5e2df62839 (patch)
tree3a16ad2b677ad1b7d3d322dda54cd372536e96c7
parent4bc345834300a729f3c50c46c09a0e8c554f4517 (diff)
Use g_usleep in SpiceController::connect(int retries)
g_usleep is more portable than sleep()
-rw-r--r--SpiceXPI/src/plugin/controller-unix.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/SpiceXPI/src/plugin/controller-unix.cpp b/SpiceXPI/src/plugin/controller-unix.cpp
index 16f7033..04257e9 100644
--- a/SpiceXPI/src/plugin/controller-unix.cpp
+++ b/SpiceXPI/src/plugin/controller-unix.cpp
@@ -131,7 +131,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;
}