1 /* Program to produce output at regular intervals. */
5 #if __STDC__ || defined(STDC_HEADERS)
13 #include <sys/types.h>
15 #ifdef TIME_WITH_SYS_TIME
19 #ifdef HAVE_SYS_TIME_H
26 int main(int argc, char *argv[])
31 period = atoi(argv[1]);
34 /* Make sure wakeup stops when Emacs goes away. */
38 /* If fflush fails, then our stdout pipe is broken. */
39 if (fflush(stdout) != 0)
41 /* If using a period of 60, produce the output when the minute
47 tp = localtime(&when);
48 sleep(60 - tp->tm_sec);