- loop(&ti, fifo_name, buf, read_time);
+ debug("opt_fmt: \"%s\"\n", opt_fmt);
+ debug("opt_interval: %f\n", opt_interval);
+ debug("ti: {tv_sec = %ld, tv_nsec = %ld}\n", ti.tv_sec, ti.tv_nsec);
+ memset(buf, '\0', MAX_LEN);
+ signal(SIGPIPE, SIG_IGN);
+
+ for (;;) {
+ t = time(NULL);
+ strftime(buf, MAX_LEN, opt_fmt, localtime(&t));
+ puts(buf);
+ fflush(stdout);
+ snooze(&ti);
+ }