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

@@ -132,10 +132,7 @@ void Clock::Update()
myPlaylist->SwitchTo();
}
static timeval past = { 0, 0 };
gettimeofday(&past, 0);
tm *time = localtime(&past.tv_sec);
tm *time = localtime(&Global::Timer.tv_sec);
mask = 0;
Set(time->tm_sec % 10, 0);