/*
- * $Id: event.cc,v 1.9 1997/11/05 05:29:23 wessels Exp $
+ * $Id: event.cc,v 1.10 1998/03/23 22:37:10 wessels Exp $
*
* DEBUG: section 41 Event Processing
* AUTHOR: Henrik Nordstrom
};
static struct ev_entry *tasks = NULL;
+static OBJH eventDump;
void
eventAdd(const char *name, EVH * func, void *arg, time_t when)
return (time_t) 10;
return tasks->when - squid_curtime;
}
+
+void
+eventInit(void)
+{
+ cachemgrRegister("events",
+ "Event Queue",
+ eventDump, 0);
+}
+
+static void
+eventDump(StoreEntry * sentry)
+{
+ struct ev_entry *e = tasks;
+ storeAppendPrintf(sentry, "%s\t%s\n",
+ "Operation",
+ "Next Execution");
+ while (e != NULL) {
+ storeAppendPrintf(sentry, "%s\t%d seconds\n",
+ e->name, e->when - squid_curtime);
+ e = e->next;
+ }
+}
/*
- * $Id: main.cc,v 1.237 1998/03/17 05:12:36 wessels Exp $
+ * $Id: main.cc,v 1.238 1998/03/23 22:37:11 wessels Exp $
*
* DEBUG: section 1 Startup and Main Loop
* AUTHOR: Harvest Derived
do_mallinfo = 1;
mimeInit(Config.mimeTablePathname);
pconnInit();
+ eventInit();
}
serverConnectionsOpen();
if (theOutIcpConnection >= 0 && (!Config2.Accel.on || Config.onoff.accel_with_proxy))
extern void eventRun(void);
extern time_t eventNextTime(void);
extern void eventDelete(EVH * func, void *arg);
+extern void eventInit(void);
extern void fd_close(int fd);
extern void fd_open(int fd, unsigned int type, const char *);