Merge pull request #41 from anarcat/fixdelay - 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 9fe5fe3eac05fa47c7a52b1a64be88e54243bf1f
DIR parent 3fe38e966195b6dbc1ced8c59139b981bacfa189
HTML Author: xorg62 <xorg62@gmail.com>
Date: Fri, 13 Jan 2017 23:02:02 +0100
Merge pull request #41 from anarcat/fixdelay
set time structure at the right moment
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;