/*
- * $Id: comm_select.cc,v 1.11 1998/09/15 19:37:46 wessels Exp $
+ * $Id: comm_select.cc,v 1.12 1998/09/30 04:34:06 wessels Exp $
*
* DEBUG: section 5 Socket Functions
*
comm_poll_icp_incoming();
if (commCheckHTTPIncoming)
comm_poll_http_incoming();
-#if DELAY_POOLS
- if (squid_curtime > delay_pools_last_update) {
- delayPoolsUpdate(squid_curtime - delay_pools_last_update);
- delay_pools_last_update = squid_curtime;
- }
-#endif
callicp = callhttp = 0;
nfds = 0;
maxfd = Biggest_FD + 1;
comm_select_icp_incoming();
if (commCheckHTTPIncoming)
comm_select_http_incoming();
-#if DELAY_POOLS
- if (squid_curtime > delay_pools_last_update) {
- delayPoolsUpdate(squid_curtime - delay_pools_last_update);
- delay_pools_last_update = squid_curtime;
- }
-#endif
callicp = callhttp = 0;
nfds = 0;
maxfd = Biggest_FD + 1;
/*
- * $Id: delay_pools.cc,v 1.4 1998/08/20 22:29:56 wessels Exp $
+ * $Id: delay_pools.cc,v 1.5 1998/09/30 04:34:07 wessels Exp $
*
* DEBUG: section 77 Delay Pools
* AUTHOR: David Luyer <luyer@ucs.uwa.edu.au>
static struct _delayData delay_data;
static OBJH delayPoolStats;
+static time_t delay_pools_last_update = 0;
static delay_id delayId(unsigned char class, int position);
static delay_id
void
-delayPoolsUpdate(int incr)
+delayPoolsUpdate(void *unused)
{
+ int incr = squid_curtime - delay_pools_last_update;
int i;
int j;
int mpos;
int individual_restore_bytes;
int network_restore_bytes;
+ eventAdd("delayPoolsUpdate", delayPoolsUpdate, NULL, 1.0, 1);
+ if (incr < 1)
+ return;
+ delay_pools_last_update = squid_curtime;
/* Increment 3 aggregate pools */
if (Config.Delay.class1.aggregate.restore_bps != -1 &&
(delay_data.class1_aggregate +=
delay_data.class3_aggregate = Config.Delay.class3.aggregate.restore_bps;
delay_data.class3_network_map[0] = 255;
cachemgrRegister("delay", "Delay Pool Levels", delayPoolStats, 0, 1);
+ eventAdd("delayPoolsUpdate", delayPoolsUpdate, NULL, 1.0, 1);
}
/*
/*
- * $Id: protos.h,v 1.273 1998/09/29 01:33:00 wessels Exp $
+ * $Id: protos.h,v 1.274 1998/09/30 04:34:08 wessels Exp $
*
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
#if DELAY_POOLS
extern int delayClient(clientHttpRequest *);
extern void delayPoolsInit(void);
-extern void delayPoolsUpdate(int);
+extern EVH delayPoolsUpdate;
extern int delayMostBytesWanted(const MemObject * mem, int max);
extern int delayMostBytesAllowed(const MemObject * mem);
extern void delayBytesIn(delay_id, int qty);