diff options
Diffstat (limited to 'hardinfo2/util.c')
-rw-r--r-- | hardinfo2/util.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/hardinfo2/util.c b/hardinfo2/util.c index ee6040b2..b1c11174 100644 --- a/hardinfo2/util.c +++ b/hardinfo2/util.c @@ -77,3 +77,20 @@ widget_set_cursor(GtkWidget *widget, GdkCursorType cursor_type) while(gtk_events_pending()) gtk_main_iteration(); } + +static gboolean +__nonblock_cb(gpointer data) +{ + gtk_main_quit(); + return FALSE; +} + +void +nonblock_sleep(guint msec) +{ + g_timeout_add(msec, (GSourceFunc)__nonblock_cb, NULL); + gtk_main(); +} + + + |