#include #include #include "sched.h" #define min(x, y) ((x) < (y)?(x) : (y)) void sleep_untill_next_event(sched_t *psched, int n_sched) { time_t now = time(NULL); int loop; int sleep_n = now + 3600; for(loop=0; loop 0) sleep(sleep_n); }