Index: branches/eam_branches/ipp-20140813/Ohana/src/addstar/src/addstar.c
===================================================================
--- branches/eam_branches/ipp-20140813/Ohana/src/addstar/src/addstar.c	(revision 37306)
+++ branches/eam_branches/ipp-20140813/Ohana/src/addstar/src/addstar.c	(revision 37307)
@@ -1,3 +1,5 @@
 # include "addstar.h"
+
+# define RESETTIME { gettimeofday (&startTimer, (void *) NULL); }
 
 // LARGEFILES: this program currently limits Nstars (input file) to < 2^31
@@ -18,8 +20,8 @@
   SkyList *newlist = NULL;
 
-  double dtime;
-  struct timeval start, stop;
-
-  gettimeofday (&start, NULL);
+  struct timeval startAddstar, stopAddstar;
+  gettimeofday (&startAddstar, (void *) NULL);
+
+  INITTIME;
 
   SetSignals ();
@@ -44,4 +46,6 @@
   }
 
+  MARKTIME ("init and config: %f sec\n", dtime); RESETTIME; 
+
   stars = NULL;
 
@@ -50,4 +54,5 @@
     case ADDSTAR_MODE_IMAGE:
       stars = LoadStars (argv[1], &Nstars, &images, &Nimages, &options);
+      MARKTIME ("load smf: %f sec\n", dtime); RESETTIME; 
 
       // set and update the imageID sequence
@@ -127,4 +132,5 @@
       }
     }
+    MARKTIME ("load cpt: %f sec\n", dtime); RESETTIME; 
 
     // Naves_disk == 0 implies an empty catalog file
@@ -157,4 +163,6 @@
 	break;
     }
+    MARKTIME ("match stars: %f sec\n", dtime); RESETTIME; 
+
     /* report total updated values */
     Naverage += catalog.Naverage;
@@ -175,4 +183,5 @@
     dvo_catalog_unlock (&catalog);
     dvo_catalog_free (&catalog);
+    MARKTIME ("save cpt: %f sec\n", dtime); RESETTIME; 
 
     if (options.mode == ADDSTAR_MODE_REFCAT) free (stars);
@@ -208,6 +217,6 @@
   dvo_image_unlock (&db); /* unlock? */
 
-  gettimeofday (&stop, NULL);
-  dtime = DTIME (stop, start);
+  gettimeofday (&stopAddstar, (void *) NULL);
+  float dtime = DTIME (stopAddstar, startAddstar);
   fprintf (stderr, "SUCCESS: elapsed time %9.4f sec for %5d stars (%5d matches), "OFF_T_FMT" average, "OFF_T_FMT" measure, "OFF_T_FMT" lensing\n", dtime, Nstars, Nmatch,  Naverage,  Nmeasure, Nlensing);
 
