[dev] [st] [PATCH 3/5] Do not use floating point to calculate timeout

From: noname <noname_AT_inventati.org>
Date: Sat, 18 Apr 2015 16:45:26 +0000

This way is a bit more accurate.
---
 st.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/st.c b/st.c
index 30f296d..1bcdb7f 100644
--- a/st.c
+++ b/st.c
_AT_@ -3956,7 +3956,7 @@ run(void) {
 
 		clock_gettime(CLOCK_MONOTONIC, &now);
 		drawtimeout.tv_sec = 0;
-		drawtimeout.tv_nsec = (1000/xfps) * 1E6;
+		drawtimeout.tv_nsec = 1000000000 / xfps;
 		tv = &drawtimeout;
 
 		dodraw = 0;
-- 
1.8.4
Received on Sat Apr 18 2015 - 18:45:26 CEST

This archive was generated by hypermail 2.3.0 : Sat Apr 18 2015 - 18:48:24 CEST