Index: gs2-extensions/parallel-building/trunk/src/perllib/parallelbuildinginexport.pm
===================================================================
--- gs2-extensions/parallel-building/trunk/src/perllib/parallelbuildinginexport.pm	(revision 28769)
+++ gs2-extensions/parallel-building/trunk/src/perllib/parallelbuildinginexport.pm	(revision 28770)
@@ -38,4 +38,5 @@
 # Randomize the order of files in the filelist
 use List::Util qw( shuffle );
+use Time::HiRes  qw( gettimeofday tv_interval );
 
 # Greenstone Modules
@@ -43,7 +44,19 @@
 use inexport;
 
+our $start_time;
+
 BEGIN
 {
   @parallelbuildinginexport::ISA = ('inexport');
+}
+
+END
+{
+  if (defined $start_time)
+  {
+    my $end_time = [&gettimeofday()];
+    my $duration = tv_interval($start_time, $end_time);
+    print '  Duration: ' . sprintf('%0.6f', $duration) . "\n";
+  }
 }
 
@@ -84,4 +97,5 @@
                 ];
 
+
 # @function new()
 # Constructor
@@ -92,5 +106,8 @@
   my $self = new inexport(@_);
 
-  # Legacy support
+  $start_time = [&gettimeofday()];
+
+  # Legacy support - Dr Suleman initially had different names for these
+  # arguments, namely jobs and epoch
   if ($self->{'workers'} eq '' && $self->{'jobs'} ne '')
   {
@@ -105,15 +122,20 @@
   if ($self->{'batchsize'} !~ /^\d+$/)
   {
-    print STDERR "WARNING: batchsize missing or not a number - assuming batchsize = 1\n";
+    print STDERR "Warning! Batchsize missing or not a number - assuming batchsize = 1\n";
     $self->{'batchsize'} = 1;
   }
   if ($self->{'workers'} !~ /^\d+$/ || $self->{'workers'} < 1)
   {
-    print STDERR "WARNING: parallel processing not available with fewer than one worker - assuming serial import\n";
+    print STDERR "Warning! Parallel processing not available with fewer than one worker - assuming serial import\n";
     $self->{'workers'} = 0;
   }
   else
   {
-    print "Performing Parallel Import: workers:" . $self->{'workers'} . ", batchsize:" . $self->{'batchsize'} . "\n";
+    my $message = 'Performing Parallel Import';
+    print &makeHeader($message) . "\n";
+    print '  Started:   ' . @{$start_time}[0] . '.' . @{$start_time}[1] . "\n";
+    print '  Workers:   ' . $self->{'workers'} . "\n";
+    print '  Batchsize: ' . $self->{'batchsize'} . "\n";
+    print '=' x 79 . "\n";
     if (!$self->{'removeold'})
     {
@@ -127,4 +149,8 @@
 }
 # new()
+
+
+## @function deinit()
+
 
 # @function _farmOutProcesses()
@@ -210,15 +236,19 @@
 # _farmOutProcesses()
 
-# @function getSupportedArguments
+
+## @function getSupportedArguments()
+#
 # Retrieve the list of arguments that are specific to this subclass of inexport
-# so they can be added to the list of supported arguments to import.pl. The
-# use of any of these arguments automatically causes this subclass to be
+# so they can be added to the list of supported arguments to import.pl. The use
+# of any of these arguments automatically causes this subclass to be
 # instantiated and used in preference to the parent class. ATM it is up to the
 # implementer to ensure these arguments are unique.
+#
 sub getSupportedArguments
 {
   return $arguments;
 }
-# getSupportedArguments()
+## getSupportedArguments() ##
+
 
 ################################################################################
@@ -312,3 +342,31 @@
 
 
+## @function makeHeader($msg, [$length])
+#
+# Create a centered header string given a certain message padded with '=' characters.
+#
+# @param $msg The message to center as a string
+# @param $length The desired length of string - defaults to 79
+# @return A string centered with '=' as padding
+#
+sub makeHeader
+{
+  my ($msg, $length) = @_;
+  if (!defined $length)
+  {
+    $length = 79; # 80 with newline
+  }
+  my $filler_length = ($length - 2 - length($msg)) / 2;
+  my $filler = '=' x $filler_length;
+  if (length($msg) % 2 == 0)
+  {
+    $msg = $filler . ' ' . $msg . ' =' . $filler;
+  }
+  else
+  {
+    $msg = $filler . ' ' . $msg . ' ' . $filler;
+  }
+  return $msg;
+}
+## makeHeader() ##
 1;
