mirror of git://git.suckless.org/st
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.
This commit is contained in:
parent
6ee56d6590
commit
c27c731b9f
3
st.c
3
st.c
|
@ -4003,8 +4003,7 @@ run(void) {
|
||||||
dodraw = 1;
|
dodraw = 1;
|
||||||
}
|
}
|
||||||
deltatime = TIMEDIFF(now, last);
|
deltatime = TIMEDIFF(now, last);
|
||||||
if(deltatime > (xev? (1000/xfps) : (1000/actionfps))
|
if(deltatime > 1000 / (xev ? xfps : actionfps)) {
|
||||||
|| deltatime < 0) {
|
|
||||||
dodraw = 1;
|
dodraw = 1;
|
||||||
last = now;
|
last = now;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue