output: use GTimer instead of time_t for reopen after failure

time() is not a monotonic timer, and MPD might get confused by clock
skews.  clock_gettime() provides a monotonic clock, but is not
portable to non-POSIX systems (i.e. Windows).  This patch uses GLib's
GTimer API, which aims to be portable.
This commit is contained in:
Max Kellermann
2009-02-28 20:43:23 +01:00
parent a5c09c91c4
commit ec4fd9fd88
6 changed files with 35 additions and 16 deletions

View File

@@ -93,7 +93,7 @@ audio_output_init(struct audio_output *ao, const struct config_param *param)
ao->plugin = plugin;
ao->enabled = config_get_block_bool(param, "enabled", true);
ao->open = false;
ao->reopen_after = 0;
ao->fail_timer = NULL;
pcm_convert_init(&ao->convert_state);