aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-08-25 18:26:29 +0200
committerMax Kellermann <max@duempel.org>2011-08-25 18:42:44 +0200
commit89355edb8a28c4a72d841a79d5bf261a8b244569 (patch)
treec414ac2e6c0fa681c9c31e5599d1ae5860c5c6f5 /src
parent37c8f5c1da33f1e0fc2352582855984b0df7bd95 (diff)
downloadmpd-89355edb8a28c4a72d841a79d5bf261a8b244569.tar.gz
mpd-89355edb8a28c4a72d841a79d5bf261a8b244569.tar.xz
mpd-89355edb8a28c4a72d841a79d5bf261a8b244569.zip
glib_compat.h: add g_timeout_source_new_seconds()
Diffstat (limited to 'src')
-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 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)
{