소스 검색

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.
noname@inventati.org 10 년 전
부모
커밋
c27c731b9f
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      st.c

+ 1 - 2
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;
 		}