On 9 June 2011 13:39, Imre Saling <imre.saling at saling.ch> wrote:
> or to get the elapsed time since the last call to elapsed():
>
> my $t0 = time;
> sub elapsed {
...
> }
sub start {
return $last = time;
}
sub lap {
my $t = time;
push (@laps, $t - $last);
$last = $t;
return $laps[-1];
}
sub reset {
(@laps) = ( );
}