summaryrefslogtreecommitdiffstats
path: root/qga
diff options
context:
space:
mode:
authorMarc-André Lureau2022-04-20 15:25:54 +0200
committerMarc-André Lureau2022-04-21 15:03:51 +0200
commit4e8c41947b0eb5a96e940aa1be8ff71abb46d33f (patch)
treefafbb33d5620435babdfbdf3a72e9a50d35e6a67 /qga
parentinclude: rename qemu-common.h qemu/help-texts.h (diff)
downloadqemu-4e8c41947b0eb5a96e940aa1be8ff71abb46d33f.tar.gz
qemu-4e8c41947b0eb5a96e940aa1be8ff71abb46d33f.tar.xz
qemu-4e8c41947b0eb5a96e940aa1be8ff71abb46d33f.zip
qga: replace usleep() with g_usleep()
The latter simply requires glib.h, while the former is not in the Windows API (but provided by mingw header & CRT) Also simplify the expression for 1/10s. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20220420132624.2439741-12-marcandre.lureau@redhat.com>
Diffstat (limited to 'qga')
-rw-r--r--qga/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qga/main.c b/qga/main.c
index e4b22df01d..aa00ad8fab 100644
--- a/qga/main.c
+++ b/qga/main.c
@@ -610,7 +610,7 @@ static gboolean channel_event_cb(GIOCondition condition, gpointer data)
* host-side chardev. sleep a bit to mitigate this
*/
if (s->virtio) {
- usleep(100 * 1000);
+ g_usleep(G_USEC_PER_SEC / 10);
}
return true;
default: