Преглед изворни кода

Output time parsed per file correctly, was always showing time since program start for each file

sbingner пре 25 година
родитељ
комит
9b6f3add71
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      pisg.pl

+ 2 - 1
pisg.pl

@@ -226,6 +226,7 @@ sub init_pisg
     $normals = "0";
     $normals = "0";
     $time = localtime($timestamp);
     $time = localtime($timestamp);
     $repeated = 0;
     $repeated = 0;
+    $conf->{start} = time();   # set start time of file parse
 
 
     print "Using language template: $conf->{lang}\n\n" if ($conf->{lang} ne 'EN');
     print "Using language template: $conf->{lang}\n\n" if ($conf->{lang} ne 'EN');
 
 
@@ -632,7 +633,7 @@ sub parse_file
 
 
     close(LOGFILE);
     close(LOGFILE);
 
 
-    my ($sec,$min,$hour) = gmtime(time - $^T);
+    my ($sec,$min,$hour) = gmtime(time - $conf->{start});
     $processtime = sprintf("%02d hours, %02d minutes and %02d seconds", $hour,  $min, $sec);
     $processtime = sprintf("%02d hours, %02d minutes and %02d seconds", $hour,  $min, $sec);
 
 
     $nicks = scalar keys %line;
     $nicks = scalar keys %line;