From: martinahansen Date: Tue, 23 Sep 2008 06:45:50 +0000 (+0000) Subject: fixed STDERR and verbose X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7e8d72acd946f771903fa8d97071a2393e9a01c6;p=biopieces.git fixed STDERR and verbose git-svn-id: http://biopieces.googlecode.com/svn/trunk@266 74ccb610-7750-0410-82ae-013aeee3265d --- diff --git a/code_perl/Maasha/Biopieces.pm b/code_perl/Maasha/Biopieces.pm index 6bf84e2..b910f9a 100644 --- a/code_perl/Maasha/Biopieces.pm +++ b/code_perl/Maasha/Biopieces.pm @@ -110,14 +110,8 @@ close $log_local; # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> RUN SCRIPT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -my $t0 = gettimeofday(); - run_script( $script ); -my $t1 = gettimeofday(); - -print STDERR "Program: $script" . ( " " x ( 25 - length( $script ) ) ) . sprintf( "Run time: %.4f\n", ( $t1 - $t0 ) ); - # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> SUBROUTINES <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @@ -158,7 +152,9 @@ sub run_script # Returns nothing. - my ( $options, $in, $out ); + my ( $t0, $t1, $options, $in, $out ); + + $t0 = gettimeofday(); $options = get_options( $script ); @@ -267,6 +263,10 @@ sub run_script close $in if defined $in; close $out; + + $t1 = gettimeofday(); + + print STDERR "Program: $script" . ( " " x ( 25 - length( $script ) ) ) . sprintf( "Run time: %.4f\n", ( $t1 - $t0 ) ) if $options->{ 'verbose' }; }