From 4aacc63f9401b603d057a58c335fc6aaa5063735 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 2 Dec 2015 17:40:31 -0500 Subject: [PATCH] JBAS-980 throttle_disbatcher.pl time printing fix Code previously displayed "Time::tm=ARRAY(0xe1e4f8)" instead of a time string. Signed-off-by: Bill Erickson --- KCLS/linking/throttle_disbatcher.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/KCLS/linking/throttle_disbatcher.pl b/KCLS/linking/throttle_disbatcher.pl index 12bee51540..affa9dc965 100755 --- a/KCLS/linking/throttle_disbatcher.pl +++ b/KCLS/linking/throttle_disbatcher.pl @@ -28,7 +28,7 @@ use Getopt::Long; use Time::localtime; -use POSIX qw/:sys_wait_h/; +use POSIX qw/:sys_wait_h strftime/; $SIG{CHLD} = \&sig_handler; @@ -143,8 +143,9 @@ sub dispatch { } elsif ($pid) { $running++; $now_time = localtime; - print "$count of $goal processed at " . $now_time . "\n" if ($verbose && $count); - print($now_time . ": dispatched: $command\n") if ($verbose); + my $now_string = strftime("%a %b %e %H:%M:%S %Y", CORE::localtime); + print "$count of $goal processed at $now_string\n" if ($verbose && $count); + print($now_string . ": dispatched: $command\n") if ($verbose); print $running . " processes running\n" if ($verbose); } elsif ($pid == 0) { exec($command); -- 2.11.0