Skip to content

Commit

Permalink
little bit different protection against flickering
Browse files Browse the repository at this point in the history
  • Loading branch information
okbob committed Apr 22, 2021
1 parent a2a4583 commit a1dda9a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/pspg.c
Original file line number Diff line number Diff line change
Expand Up @@ -3576,21 +3576,23 @@ leaveok(stdscr, TRUE);
long td = time_diff(current_sec, current_ms,
last_doupdate_sec, last_doupdate_ms);

limit = last_first_row == first_row ? 20 : 30;
limit = last_first_row == first_row ? 15 : 30;

if (td < limit)
usleep((limit - td) * 1000);

current_time(&current_sec, &current_ms);
}

last_doupdate_sec = current_sec;
last_doupdate_ms = current_ms;
last_first_row = first_row;
}

doupdate();

last_doupdate_sec = current_sec;
last_doupdate_ms = current_ms;


#ifdef DEBUG_PIPE

print_duration(start_doupdate_sec, start_doupdate_ms, "doupdate");
Expand Down

0 comments on commit a1dda9a

Please sign in to comment.