From de00233983f5df5158cbf7dfc14d493e985dda43 Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Wed, 30 Apr 2025 02:35:33 -0700 Subject: use more optimized g_timeout_add_seconds --- remote_plot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/remote_plot.c b/remote_plot.c index 6f3279d..512e40c 100644 --- a/remote_plot.c +++ b/remote_plot.c @@ -701,7 +701,8 @@ static void activate (GtkApplication *app, gpointer user_data) read_data(user_data); //printf("before g_timeout_add\n"); - g_timeout_add(1000,read_data,user_data); + // https://docs.gtk.org/glib/func.timeout_add.html wrote g_timeout_add_seconds() is more optimized than g_timeout_add() + g_timeout_add_seconds(1000,read_data,user_data); //printf("after g_timeout_add\n"); } -- cgit v1.2.3-70-g09d2