poll mpd once per second, no need to do it more often

This commit is contained in:
Andrzej Rybczak
2009-03-22 16:11:44 +01:00
parent bf71a01b1c
commit ffbcfb7e18
2 changed files with 2 additions and 4 deletions

View File

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