pinosaur
/
st.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6ee56d6
)
Monotonic clock cannot jump backwards.
author
noname@inventati.org
<noname@inventati.org>
Sat, 18 Apr 2015 16:46:17 +0000
(18:46 +0200)
committer
Roberto E. Vargas Caballero
<k0ga@shike2.com>
Mon, 20 Apr 2015 07:18:40 +0000
(09:18 +0200)
The check was introduced back when st used gettimeofday.
The condition is also modified to increment the accuaracy of the
calculation.
st.c
patch
|
blob
|
history
diff --git
a/st.c
b/st.c
index
bf5b675
..
c7589f4
100644
(file)
--- 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;
}