Xinqi Bao's Git
projects
/
st.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
Monotonic clock cannot jump backwards.
[st.git]
/
st.c
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);
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;
}
dodraw = 1;
last = now;
}