in reply to How to format Benchmark results in hours?

my $difference = timediff($end_time, $start_time); my $sec = @$difference[0]; my $hour = sprintf('%0.2f', ($sec / 3600));
This should work. EDIT: Changed so the hour formatting is better.