L
luserXtrog
Does anyone have any advice on how best to call a function
once a minute to change a clock face?
My thought so far is:
{ time_t tt;
struct tm *ptm;
time(&tt);
ptm = localtime(&tt);
sleep /* sleep is posix, isn't it? */
(ptm->tm_sec);
while(1) {
my_func();
sleep(60);
}
}
Without posix, would I have to do a busy loop?
once a minute to change a clock face?
My thought so far is:
{ time_t tt;
struct tm *ptm;
time(&tt);
ptm = localtime(&tt);
sleep /* sleep is posix, isn't it? */
(ptm->tm_sec);
while(1) {
my_func();
sleep(60);
}
}
Without posix, would I have to do a busy loop?