Perl script to find a number in matching lines and report the sum.
<geshi lang="perl"> perl -ne '$sum += $1 if /in (.*) seconds/; END { print $sum }' </geshi>