reduce number of calls to gettimeofday

This commit is contained in:
Andrzej Rybczak
2012-09-07 23:11:40 +02:00
parent 89d3bd884f
commit 45a097a45b
8 changed files with 22 additions and 19 deletions

View File

@@ -95,7 +95,7 @@ void ServerInfo::Update()
static timeval past = { 0, 0 };
if (Global::Timer.tv_sec <= past.tv_sec)
return;
gettimeofday(&past, 0);
past = Global::Timer;
MPD::Statistics stats = Mpd.getStatistics();
if (stats.empty())