Browse Source

Monotonic clock cannot jump backwards.

The check was introduced back when st used gettimeofday.
The condition is also modified to increment the accuaracy of the
calculation.
master
noname@inventati.org 9 years ago
committed by Roberto E. Vargas Caballero
parent
commit
c27c731b9f
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      st.c

+ 1
- 2
st.c View File

@ -4003,8 +4003,7 @@ run(void) {
dodraw = 1;
}
deltatime = TIMEDIFF(now, last);
if(deltatime > (xev? (1000/xfps) : (1000/actionfps))
|| deltatime < 0) {
if(deltatime > 1000 / (xev ? xfps : actionfps)) {
dodraw = 1;
last = now;
}


Loading…
Cancel
Save