revert back to polling mpd twice per second

This commit is contained in:
Andrzej Rybczak
2009-03-29 16:56:09 +02:00
parent 1acca770db
commit 18271fb616

View File

@@ -115,7 +115,9 @@ void TraceMpdStatus()
static timeval past, now;
gettimeofday(&now, 0);
if (Mpd->Connected() && now.tv_sec > past.tv_sec)
if (Mpd->Connected()
&& ((now.tv_sec == past.tv_sec && now.tv_usec >= past.tv_usec+500000) || now.tv_sec > past.tv_sec)
)
{
Mpd->UpdateStatus();
BlockItemListUpdate = 0;