notify_queue: use g_timeout_add_seconds()

This commit is contained in:
A. Klitzing 2009-10-15 21:22:39 +02:00
parent b69246c646
commit 792010ba32

View File

@ -33,7 +33,7 @@ enum {
* update_enqueue(). This increases the probability that * update_enqueue(). This increases the probability that
* updates can be bundled. * updates can be bundled.
*/ */
INOTIFY_UPDATE_DELAY_MS = 5000, INOTIFY_UPDATE_DELAY_S = 5,
}; };
static GSList *inotify_queue; static GSList *inotify_queue;
@ -102,7 +102,7 @@ mpd_inotify_enqueue(char *uri_utf8)
if (queue_source_id != 0) if (queue_source_id != 0)
g_source_remove(queue_source_id); g_source_remove(queue_source_id);
queue_source_id = g_timeout_add(INOTIFY_UPDATE_DELAY_MS, queue_source_id = g_timeout_add_seconds(INOTIFY_UPDATE_DELAY_S,
mpd_inotify_run_update, NULL); mpd_inotify_run_update, NULL);
inotify_queue = NULL; inotify_queue = NULL;