my $benchmarkEnd = Benchmark->new(); my $diff = Benchmark::timediff($benchmarkEnd, $benchmarkStart); my $str = Benchmark::timestr($diff); my ($cpuTime, $exectime); if ($str =~ /(\d+)\s*wallclock secs \(\s*?(\d*?\.\d*?)\s*usr\s*\+\s*(\d*?\.\d*?)\s/i) { $cpuTime = $2; $execTime = $1; # printf ("Execution time: ~ %.0f seconds\nCPU-Time : %.2f\n", $1, $2); } # if print "CPUTIME: $cpuTime, EXECTIME: $execTime\n";