Re: [dev] [st] Changing system clock backwards disables st

From: Eckehard Berns <ecki-suckless_AT_ecki.to>
Date: Sun, 27 Oct 2013 08:44:13 +0100

> When setting the system clock backwards in time (in my particular case,
> it was using ntpd -qg), st appears to stop painting for the difference.
>
> (Is it worth dealing with? The last one was 97 seconds, but it’s no
> problem at all to just open another terminal.)

I think I saw a patch for this on the list. If not, here's what I'm
doing:

Index: st-0.4.1_g0f6942c/st.c
===================================================================
--- st-0.4.1_g0f6942c.orig/st.c
+++ st-0.4.1_g0f6942c/st.c
_AT_@ -3720,7 +3720,7 @@ run(void) {
                         gettimeofday(&lastblink, NULL);
                         dodraw = 1;
                 }
- if(TIMEDIFF(now, last) \
+ if(TIMEDIFF(now, last) < 0 || TIMEDIFF(now, last) \
> (xev? (1000/xfps) : (1000/actionfps))) {
                         dodraw = 1;
                         last = now;

-- 
Eckehard Berns
Received on Sun Oct 27 2013 - 08:44:13 CET

This archive was generated by hypermail 2.3.0 : Sun Oct 27 2013 - 08:48:06 CET