my $type = shift;
my %plugins;
+ my $interval;
our $cb_name = undef;
%plugins = %{$plugins[$type]};
}
+ $interval = plugin_get_interval ();
+
foreach my $plugin (keys %plugins) {
my $p = $plugins{$plugin};
my $status = 0;
if ($p->{'wait_left'} > 0) {
- $p->{'wait_left'} -= $interval_g;
+ $p->{'wait_left'} -= $interval;
}
next if ($p->{'wait_left'} > 0);
if ($status) {
$p->{'wait_left'} = 0;
- $p->{'wait_time'} = $interval_g;
+ $p->{'wait_time'} = $interval;
}
elsif (TYPE_READ == $type) {
- if ($p->{'wait_time'} < $interval_g) {
- $p->{'wait_time'} = $interval_g;
+ if ($p->{'wait_time'} < $interval) {
+ $p->{'wait_time'} = $interval;
}
$p->{'wait_left'} = $p->{'wait_time'};
}
%p = (
- wait_time => $interval_g,
+ wait_time => plugin_get_interval (),
wait_left => 0,
cb_name => $data,
);