mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-23 18:52:09 +01:00
gtestdbus: Use g_timeout_add_seconds() rather than g_timeout_add()
This makes the code a little easier to understand and allows the kernel a little bit more leeway in scheduling the callback, which is fine because we don’t need high accuracy here. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
parent
e8c068db50
commit
19eee4bc41
@ -94,7 +94,7 @@ _g_object_unref_and_wait_weak_notify (gpointer object)
|
|||||||
g_idle_add (unref_on_idle, object);
|
g_idle_add (unref_on_idle, object);
|
||||||
|
|
||||||
/* Make sure we don't block forever */
|
/* Make sure we don't block forever */
|
||||||
timeout_id = g_timeout_add (30 * 1000, on_weak_notify_timeout, &data);
|
timeout_id = g_timeout_add_seconds (30, on_weak_notify_timeout, &data);
|
||||||
|
|
||||||
g_main_loop_run (data.loop);
|
g_main_loop_run (data.loop);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user