From 19eee4bc412fa6a15a3b65711408bc54978474fe Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 15 Nov 2022 17:51:41 +0000 Subject: [PATCH] gtestdbus: Use g_timeout_add_seconds() rather than g_timeout_add() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- gio/gtestdbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gio/gtestdbus.c b/gio/gtestdbus.c index cf7d1a4b8..6aedb3eae 100644 --- a/gio/gtestdbus.c +++ b/gio/gtestdbus.c @@ -94,7 +94,7 @@ _g_object_unref_and_wait_weak_notify (gpointer object) g_idle_add (unref_on_idle, object); /* 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);