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

@@ -76,8 +76,8 @@ class Playlist : public Screen<NC::Window>, public Filterable, public HasSongs,
bool SortingInProgress();
void EnableHighlighting();
void UpdateTimer() { time(&itsTimer); }
time_t Timer() const { return itsTimer; }
void UpdateTimer();
timeval Timer() const { return itsTimer; }
bool Add(const MPD::Song &s, bool play, int position = -1);
bool Add(const MPD::SongList &l, bool play, int position = -1);
@@ -114,7 +114,7 @@ class Playlist : public Screen<NC::Window>, public Filterable, public HasSongs,
size_t itsRemainingTime;
size_t itsScrollBegin;
time_t itsTimer;
timeval itsTimer;
};
extern Playlist *myPlaylist;