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

2015-04-20 Thread Roberto E. Vargas Caballero
> - drawtimeout.tv_nsec = (1000/xfps) * 1E6; > + drawtimeout.tv_nsec = 10 / xfps; I like the patch, but not the comment. In the original code there is no floating point calculation at all; the division is integer, but is true that there is accuary lost. Maybe the be

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

2015-04-18 Thread noname
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 @@ -3956,7 +3956,7 @@ run(void) { clock_gettime(CLOCK_MONOTONIC, &now); drawtimeout.tv_sec