Don't stop refreshing if clock was adjusted.

This commit is contained in:
Hisham Muhammad 2014-05-05 23:18:14 -03:00
parent ff6cddfd16
commit b7de9bd0f5
1 changed files with 1 additions and 0 deletions

1
htop.c
View File

@ -529,6 +529,7 @@ int main(int argc, char** argv) {
gettimeofday(&tv, NULL); gettimeofday(&tv, NULL);
double newTime = ((double)tv.tv_sec * 10) + ((double)tv.tv_usec / 100000); double newTime = ((double)tv.tv_sec * 10) + ((double)tv.tv_usec / 100000);
bool recalculate = (newTime - oldTime > settings->delay); bool recalculate = (newTime - oldTime > settings->delay);
if (newTime < oldTime) recalculate = true; // clock was adjusted?
int following = follow ? selectedPid(panel) : -1; int following = follow ? selectedPid(panel) : -1;
if (recalculate) { if (recalculate) {
Header_draw(header); Header_draw(header);