Cleanup Timer code

git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@444 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Matt Sergeant 2005-06-22 18:24:34 +00:00
parent cb047d9aa9
commit 5853c3a011

View File

@ -116,11 +116,8 @@ sub AddTimer {
my ($secs, $coderef) = @_;
my $timeout = time + $secs;
use Data::Dumper; $Data::Dumper::Indent=1;
if (!@Timers || ($timeout > $Timers[-1][0])) {
push @Timers, [$timeout, $coderef];
print STDERR Dumper(\@Timers);
return;
}
@ -128,7 +125,6 @@ sub AddTimer {
for (my $i = 0; $i < @Timers; $i++) {
if ($Timers[$i][0] > $timeout) {
splice(@Timers, $i, 0, [$timeout, $coderef]);
print STDERR Dumper(\@Timers);
return;
}
}