]> git.donarmstrong.com Git - biopieces.git/commitdiff
fixed STDERR and verbose
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 23 Sep 2008 06:45:50 +0000 (06:45 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 23 Sep 2008 06:45:50 +0000 (06:45 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@266 74ccb610-7750-0410-82ae-013aeee3265d

code_perl/Maasha/Biopieces.pm

index 6bf84e28f7e3d3a02756b902c32cc59d177a436c..b910f9af63fe54cb26ce0bcf9181a4a7a0463665 100644 (file)
@@ -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' };
 }