aboutsummaryrefslogtreecommitdiff
path: root/src/glib_compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/glib_compat.h')
-rw-r--r--src/glib_compat.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/glib_compat.h b/src/glib_compat.h
index 6a59c46e..35ec77df 100644
--- a/src/glib_compat.h
+++ b/src/glib_compat.h
@@ -32,6 +32,12 @@
#define g_queue_clear(q) do { g_queue_free(q); q = g_queue_new(); } while (0)
+static inline GSource *
+g_timeout_source_new_seconds(guint interval)
+{
+ return g_timeout_source_new(interval * 1000);
+}
+
static inline guint
g_timeout_add_seconds(guint interval, GSourceFunc function, gpointer data)
{