st

simple terminal

git clone https://9o.is/git/st.git

commit ae407922ca3e9a9ef2fd6cb500b83d87e5f26e28
parent b779ed1835aebc26452c0e1489ea691c1d49009a
Author: noname@inventati.org <noname@inventati.org>
Date:   Sat, 18 Apr 2015 18:46:17 +0200

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.

Diffstat:
Mst.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/st.c b/st.c @@ -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; }