glib_compat.h: add g_timeout_source_new_seconds()

This commit is contained in:
Max Kellermann 2011-08-25 18:26:29 +02:00
parent 37c8f5c1da
commit 89355edb8a

View File

@ -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)
{