- or download this
while (my $logline = <LOG>) {
# parse it
}
- or download this
sleep 1 unless $. % 100 - or download this
sub CPU_used {
(map $_->[0]+$_->[1], [times])[0]
}
- or download this
CPU_start();
while (my $logline = <LOG>) {
# parse it
CPU_max(.2) unless $. % $lines_per_second;
}