}
void
-fifo_read_all(Config *cfg, struct timespec t, char *buf)
+fifo_read_all(Config *cfg, char *buf)
{
fd_set fds;
int maxfd = -1;
int ready = 0;
struct stat st;
+ struct timespec t;
FD_ZERO(&fds);
for (Fifo *f = cfg->fifos; f; f = f->next) {
if (ready < 0)
/* TODO: Do we really want to fail here? */
fatal("%s", strerror(errno));
+ clock_gettime(CLOCK_MONOTONIC, &t);
while (ready) {
for (Fifo *f = cfg->fifos; f; f = f->next) {
if (FD_ISSET(f->fd, &fds)) {
* fifo_read_all and desired time of next TTL check?
*/
/* TODO: How long to wait on IO? Max TTL? */
- fifo_read_all(cfg, t0, buf);
+ fifo_read_all(cfg, buf);
if (cfg->output_to_x_root_window) {
if (XStoreName(display, DefaultRootWindow(display), buf) < 0)
fatal("XStoreName failed.\n");