diff options
author | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2008-01-18 13:46:30 +0000 |
---|---|---|
committer | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2008-01-18 13:46:30 +0000 |
commit | 00ad2e9e1c6cf9e14c76660f2b748247c1f4bd83 (patch) | |
tree | 8389cf482409a7fefed1eac274d471188c89eab7 /src/sync-alarm.c | |
parent | 58624f1dfc9a6fc6fec14b3ce77ac2fa0fc95401 (diff) | |
download | conntrack-tools-00ad2e9e1c6cf9e14c76660f2b748247c1f4bd83.tar.gz conntrack-tools-00ad2e9e1c6cf9e14c76660f2b748247c1f4bd83.zip |
yet another rework of the alarm scheduler
Diffstat (limited to 'src/sync-alarm.c')
-rw-r--r-- | src/sync-alarm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sync-alarm.c b/src/sync-alarm.c index 6ee306e..9ab9d96 100644 --- a/src/sync-alarm.c +++ b/src/sync-alarm.c @@ -38,7 +38,7 @@ static void refresher(struct alarm_list *a, void *data) init_alarm(a, u, refresher); set_alarm_expiration(a, random() % CONFIG(refresh) + 1, - random() % 999999 + 1); + ((random() % 5 + 1) * 200000) - 1); add_alarm(a); @@ -54,7 +54,7 @@ static void cache_alarm_add(struct us_conntrack *u, void *data) init_alarm(alarm, u, refresher); set_alarm_expiration(alarm, random() % CONFIG(refresh) + 1, - random() % 999999 + 1); + ((random() % 5 + 1) * 200000) - 1); add_alarm(alarm); } |