/* Program to produce output at regular intervals. */
+#include "config.h"
+
#include <stdio.h>
-#include <time.h>
#include <sys/types.h>
+
+#ifdef TIME_WITH_SYS_TIME
#include <sys/time.h>
+#include <time.h>
+#else
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#else
+#include <time.h>
+#endif
+#endif
struct tm *localtime ();