URI:
       set time structure at the right moment - tty-clock - port of tty-clock to OpenBSD, with pledge/unveil added as goodie.
  HTML git clone https://git.drkhsh.at/tty-clock.git
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit 59f358fd0fd66be301b5c88c9458b02445f5ba30
   DIR parent 516afbf9f96101c0bed1c366f80d7ca087b0557d
  HTML Author: Antoine Beaupré <anarcat@debian.org>
       Date:   Fri, 13 Jan 2017 16:52:58 -0500
       
       set time structure at the right moment
       
       the way this was working before, we would populate the ttyclock->lt
       field *after* fetching the ttyclock->tm structure, which means that
       would get the `localtime` of the *previous* iteration. this created a
       one second delay in the clock display that was, I believe,
       unintentional. this accounts for part of the 2s delay when compared to
       other clocks like vtclock or xclock.
       
       Closes: #40
       
       Diffstat:
         M ttyclock.c                          |       2 +-
       
       1 file changed, 1 insertion(+), 1 deletion(-)
       ---
   DIR diff --git a/ttyclock.c b/ttyclock.c
       @@ -182,11 +182,11 @@ update_hour(void)
             int ihour;
             char tmpstr[128];
        
       +     ttyclock->lt = time(NULL);
             ttyclock->tm = localtime(&(ttyclock->lt));
             if(ttyclock->option.utc) {
                 ttyclock->tm = gmtime(&(ttyclock->lt));
             }
       -     ttyclock->lt = time(NULL);
        
             ihour = ttyclock->tm->tm_hour;