Ive written an alarm clock program which now function as it should. However, when I look at the process list in top, I see that the alarm program is using 100% of one of my processor cores capacity. I don't see cron using anywhere near that much processor capacity; is there a more economical way to check the current time than a loop?
Code:do{ time(&tmp); } while (tmp != timedata);



LinkBack URL
About LinkBacks





; I will look into sleep system calls as CommonTater suggested. Im running FreeBSD 8.2 and I compile with gcc 4.5, by the way.