9 void keep_running(int _) {
11 puts("\nmarching on...");
15 puts("stops roughly at 15-minute time boundaries");
16 puts("CTRL+C for no stop in the next 5 minutes");
17 puts("stop with ctrl+\\ (SIGQUIT)");
18 signal(SIGQUIT, exit);
19 signal(SIGINT, keep_running);
22 time_t unixtime = time(NULL);
23 if (unixtime - last < 300) continue;
24 struct tm *t = localtime(&unixtime);
25 if (t->tm_hour >= 5 && t->tm_hour != 23) continue;
26 if (t->tm_min % 15 != 0) continue;