All pastes #163144 Raw Edit

Untitled

public c v1 · immutable
·published 2006-09-07 06:39 UTC
rendered paste body
int check_time(TWidget * wid){	TWidget * menubar = (TWidget *)wid->data2;	ttk_clockdata * cd = (ttk_clockdata *)wid->data;	struct tm * timeinfo = &cd->time;	time_t rawtime = time((time_t *)NULL);	struct tm * check = localtime(&rawtime);	if((check->tm_hour != timeinfo->tm_hour) || (check->tm_min != timeinfo->tm_min))	{		printf("the time has changed!\n");		cd->time = *check;		wid->draw(wid, menubar->win->srf);	}	return 0;}