I must be doing something wrong, but I can't figure it out. When I give seconds as an argument to localtime(), I get seconds and 16 hours back.
my $startTime = time;
(process)
my $endTime = time;
my $diffTime = ( $endTime - $startTime );
($sec,$min,$hour) = localtime( $diffTime );
print STDERR "diffTime = $diffTime\n";
print STDERR "hour = $hour\n";
print STDERR "min= $min\n";
print STDERR "sec = $sec\n";
print( sprintf( "Elapsed time : %02d:%02d:%02d\n", $hour, $min, $sec ) );
...always prints:
diffTime = 4
hour = 16
min= 0
sec = 4
Elapsed time : 16:00:04
OKAY. Figured out how to add comments - NoScript settings were too tight.
Thanks...
I can't seem to add comments to this thread, so I'll just thank everyone here.
NOT using gmtime was the problem. It may not be the most efficient solution, but it works for what I need, which is just a simple bit of info for the user to evaluate how long he/she might wait for the routine to complete and make decisions about how large an input dataset he/she is comfortable with.