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>
This commit is contained in:
Marc-André Lureau 2022-04-20 17:25:54 +04:00
parent 49f9522193
commit 4e8c41947b
1 changed files with 1 additions and 1 deletions

View File

@ -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: