]> git.armaanb.net Git - st.git/commitdiff
Increment accuaracy in drawtime calculation
authornoname@inventati.org <noname@inventati.org>
Sat, 18 Apr 2015 16:45:48 +0000 (18:45 +0200)
committerRoberto E. Vargas Caballero <k0ga@shike2.com>
Mon, 20 Apr 2015 07:20:35 +0000 (09:20 +0200)
This way is a bit more accurate.

st.c

diff --git a/st.c b/st.c
index c7589f490daecc4c806011b4eb392907af2ac681..dcb80cab4dfa7fb01312b10bb32d0fc8002c6eab 100644 (file)
--- a/st.c
+++ b/st.c
@@ -3992,7 +3992,7 @@ run(void) {
 
                clock_gettime(CLOCK_MONOTONIC, &now);
                drawtimeout.tv_sec = 0;
-               drawtimeout.tv_nsec = (1000/xfps) * 1E6;
+               drawtimeout.tv_nsec =  (1000 * 1E6)/ xfps;
                tv = &drawtimeout;
 
                dodraw = 0;