From 89355edb8a28c4a72d841a79d5bf261a8b244569 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 25 Aug 2011 18:26:29 +0200 Subject: [PATCH] glib_compat.h: add g_timeout_source_new_seconds() --- src/glib_compat.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/glib_compat.h b/src/glib_compat.h index 6a59c46e1..35ec77df6 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) {