I don't know if I understand you correctly, but I'll take a crack.
Are you trying to get cumulative?:
in your test loop (untested)...
$self->{start} = $self->{start} || gettimeofday(): ... # at end of test my $end = gettimeofday(); $self->{duration} += ($end - $self->{start});
Then in your cleanup sub, get the data simply by using $self->{duration}.
If you need a count for each test, keep the existing code, but add at the end:
$self->{tests}{test_name} = $duration;
Then in cleanup, loop over $self->{tests} and extract the duration for each test.
You'll need to fill us in on exactly what you want for us to give a full response.
-stevieb
In reply to Re: Passing a duration time from 1 subroutine to another
by stevieb
in thread Passing a duration time from 1 subroutine to another
by gasjunkie_jabz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |