Index: trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm
===================================================================
--- trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm	(revision 27900)
+++ trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm	(revision 27901)
@@ -17,4 +17,5 @@
                     resolve_project
                     getCamRunByCamID
+                    parse_md_fast
                     );
 our %EXPORT_TAGS = (standard => [@EXPORT_OK]);
@@ -27,8 +28,8 @@
 use PS::IPP::Config qw( :standard );
 use Carp;
-use DateTime;
 use File::Temp qw(tempfile);
 use File::Basename;
 use POSIX;
+use Time::HiRes qw(gettimeofday);
 
 my $dvo_verbose = 0;
@@ -703,10 +704,10 @@
         next if !$astrom_resolved;
 
-        my $start_dvo = DateTime->now->mjd;
+        my $start_dvo = gettimeofday();
         my $command = "$dvoImagesAtCoords -astrom $astrom_resolved $ra $dec";
         # run the tool and parse the output
         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
                     run(command => $command, verbose => $dvo_verbose);
-        my $dtime_dvo = (DateTime->now->mjd - $start_dvo)* 86400.;
+        my $dtime_dvo = gettimeofday() - $start_dvo;
 #        print "Time to run dvoImagesAtCoords: $dtime_dvo\n";
         unless ($success) {
@@ -731,10 +732,14 @@
         my $n = scalar @lines;
         if ($n != 1) {
-            print STDERR "unexpected number of lines returned by dvoImagesAtCoords: $n\n";
-
             # XXX: There is a bug in dvo where each component is listed twice
             # When that gets fixed remove the conditional and just die
-            die "unexpected number lines returned by dvoImagesAtCoords: $n"
-                if ($n != 2) or ($lines[0] ne $lines[1]);
+            if ($n ne 2 or $lines[0] ne $lines[1]) {
+                print STDERR "unexpected number of lines returned by dvoImagesAtCoords: $n\n";
+                print STDERR "OUTPUT:\n$output\n";
+                # actually this seems to happen sometimes. Probably due to a problem with
+                # astrometry. Just skip this camRun
+                print STDERR "skipping: $astrom\n";
+                next;
+            }
         }
 
@@ -1232,5 +1237,5 @@
 
     print "Running $command\n" if !$verbose;
-    my $start_tool = DateTime->now->mjd;
+    my $start_tool = gettimeofday();
     # run the command and parse the output
 
@@ -1243,6 +1248,6 @@
     }
 
-    my $now = DateTime->now->mjd;
-    my $dtime_tool = (DateTime->now->mjd - $start_tool) * 86400.;
+    my $now = gettimeofday();
+    my $dtime_tool = $now - $start_tool;
     print "Time to run $program: $dtime_tool\n";
 
@@ -1252,5 +1257,5 @@
     }
 
-    my $start_parse = DateTime->now->mjd;
+    my $start_parse = gettimeofday();
 
     my $mdcParser = PS::IPP::Metadata::Config->new;
@@ -1258,5 +1263,5 @@
         or die ("Unable to parse metadata config doc");
 
-    my $dtime_parse = (DateTime->now->mjd - $start_parse) * 86400.;
+    my $dtime_parse = gettimeofday() - $start_parse;
     print "Time to parse results from $program: $dtime_parse\n";
 
