Help for this page

Select Code to Download


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