Commit 82e9d54d authored by deuce's avatar deuce
Browse files

Update the clock if the minute changes as well as if sixty seconds have

passed.
parent 72796975
......@@ -541,12 +541,16 @@ static void scroll_text(int x1, int y1, int x2, int y2, int down)
static void timedisplay(BOOL force)
{
static time_t savetime;
static int savemin;
time_t now;
struct tm gm;
now=time(NULL);
if(force || difftime(now,savetime)>=60) {
localtime_r(&now, &gm);
if(force || savemin != gm.tm_min || difftime(now,savetime)>=60) {
uprintf(api->scrn_width-25,1,api->bclr|(api->cclr<<4),utimestr(&now));
savetime=now;
savemin = gm.tm_min;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment