summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eeee599)
raw | patch | inline | side by side (parent: eeee599)
author | Sebastian Harl <sh@tokkee.org> | |
Wed, 14 Nov 2012 18:00:25 +0000 (19:00 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Wed, 14 Nov 2012 18:00:25 +0000 (19:00 +0100) |
bindings/perl/lib/Collectd.pm | patch | blob | history |
index 251412cff173538962b04e5676dc0d750f489d00..c1adf4426212f3c6da5800853be49611a899730c 100644 (file)
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,
);