aboutsummaryrefslogtreecommitdiff
path: root/remote_plot.c
diff options
context:
space:
mode:
authorXiao Pan <xyz@flylightning.xyz>2025-04-30 02:35:33 -0700
committerXiao Pan <xyz@flylightning.xyz>2025-04-30 02:35:33 -0700
commitde00233983f5df5158cbf7dfc14d493e985dda43 (patch)
tree86534981b2337b644f4b6caadf677d15057de6be /remote_plot.c
parent3b9dd50ccbf6f3290c0eff0cc95dfa6cc438f4bb (diff)
use more optimized g_timeout_add_seconds
Diffstat (limited to 'remote_plot.c')
-rw-r--r--remote_plot.c3
1 files changed, 2 insertions, 1 deletions
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");
}