sub Start_timer : Test(startup) { my $test = shift; my $start = time(); cprint "#\x037Started at ", (strftime '%A %d %B %Y %H:%M:%S',localtime($start)), "\x030\n"; $test->{start} = $start; } sub End_timer : Test(shutdown) { my $test = shift; my $start = $test->{start}; my $end = time; cprint "#\x037Ended at ", (strftime '%A %d %B %Y %H:%M:%S', localtime($end)),"\x030\n"; cprintf "#\x035 Total run time=>", $end-$start, " seconds\n"; cprintf ("%02d:%02d:%02d\x030\n",(gmtime($end-$start))[2,1,0]); }