Index: /branches/eam_branches/ipp-20140610/Ohana/src/addstar/src/findskycell.c
===================================================================
--- /branches/eam_branches/ipp-20140610/Ohana/src/addstar/src/findskycell.c	(revision 36994)
+++ /branches/eam_branches/ipp-20140610/Ohana/src/addstar/src/findskycell.c	(revision 36995)
@@ -161,10 +161,4 @@
   exit (0);
 }
-
-# define MARKTIME(MSG,...) {			\
-    float dtime;				\
-    gettimeofday (&stop, (void *) NULL);	\
-    dtime = DTIME (stop, start);		\
-    fprintf (stderr, MSG, __VA_ARGS__); }
 
 int mktree (char *treefile, char *catdir) {
@@ -402,6 +396,5 @@
   }
 
-  struct timeval start, stop;
-  gettimeofday (&start, (void *) NULL);
+  INITTIME;
 
   int Npts = 10000000;
Index: /branches/eam_branches/ipp-20140610/Ohana/src/addstar/src/resort_catalog.c
===================================================================
--- /branches/eam_branches/ipp-20140610/Ohana/src/addstar/src/resort_catalog.c	(revision 36994)
+++ /branches/eam_branches/ipp-20140610/Ohana/src/addstar/src/resort_catalog.c	(revision 36995)
@@ -9,10 +9,8 @@
   off_t *next_meas;
   off_t Naves, Nmeas;
-  double dtime;
-  struct timeval start, stop;
 
   if (catalog[0].sorted == TRUE) return;
 
-  gettimeofday (&start, NULL);
+  INITTIME;
 
   /* internal counters */
@@ -26,19 +24,8 @@
   catalog[0].measure = sort_measure (catalog[0].average, Naves, catalog[0].measure, Nmeas, next_meas);
 
-  gettimeofday (&stop, NULL);
-  dtime = DTIME (stop, start);
-  fprintf (stderr, "  match time %9.4f sec for %7lld measures, %6lld average\n", dtime, (long long) Nmeas, (long long) Naves);
+  MARKTIME ("  match time %9.4f sec for %7lld measures, %6lld average\n", dtime, (long long) Nmeas, (long long) Naves);
 
   return;
 }
-
-# define MARKTIME(MSG,...) {			\
-    float dtime;				\
-    gettimeofday (&stop, (void *) NULL);	\
-    dtime = DTIME (stop, start); start = stop;	\
-    fprintf (stderr, MSG, __VA_ARGS__); }
-
-// XXX : where is the time going?  perhaps the ALLOCATE?
-// XXX : I don't thnk his is getting the right answer yet.
 
 void resort_catalog (Catalog *catalog) {
Index: /branches/eam_branches/ipp-20140610/Ohana/src/checkastro/include/checkastro.h
===================================================================
--- /branches/eam_branches/ipp-20140610/Ohana/src/checkastro/include/checkastro.h	(revision 36994)
+++ /branches/eam_branches/ipp-20140610/Ohana/src/checkastro/include/checkastro.h	(revision 36995)
@@ -5,13 +5,4 @@
 # include <assert.h>
 # include <pthread.h>
-
-# define MARKTIME(MSG,...) {			\
-    gettimeofday (&stopTimer, (void *) NULL);	\
-    float dtime = DTIME (stopTimer, startTimer);	\
-    fprintf (stderr, MSG, __VA_ARGS__); }
-
-# define INITTIME \
-  struct timeval startTimer, stopTimer; \
-  gettimeofday (&startTimer, (void *) NULL);
 
 // choose off_t or int depending on full-scale relphot analysis resources
Index: /branches/eam_branches/ipp-20140610/Ohana/src/delstar/include/delstar.h
===================================================================
--- /branches/eam_branches/ipp-20140610/Ohana/src/delstar/include/delstar.h	(revision 36994)
+++ /branches/eam_branches/ipp-20140610/Ohana/src/delstar/include/delstar.h	(revision 36995)
@@ -2,13 +2,4 @@
 # include <dvo.h>
 # include <signal.h>
-
-# define MARKTIME(MSG,...) {			\
-    gettimeofday (&stopTimer, (void *) NULL);	\
-    float dtime = DTIME (stopTimer, startTimer);	\
-    fprintf (stderr, MSG, __VA_ARGS__); }
-
-# define INITTIME \
-  struct timeval startTimer, stopTimer; \
-  gettimeofday (&startTimer, (void *) NULL);
 
 // options for generating the IndexArray used to select images for deletion (delete_duplicate_images.c)
Index: /branches/eam_branches/ipp-20140610/Ohana/src/dvomerge/src/merge_catalogs_old.c
===================================================================
--- /branches/eam_branches/ipp-20140610/Ohana/src/dvomerge/src/merge_catalogs_old.c	(revision 36994)
+++ /branches/eam_branches/ipp-20140610/Ohana/src/dvomerge/src/merge_catalogs_old.c	(revision 36995)
@@ -1,12 +1,4 @@
 # include "dvomerge.h"
 # define PSPS_ID TRUE
-
-# define MARKTIME(MSG,...) {			\
-    float dtime;				\
-    gettimeofday (&stop, (void *) NULL);	\
-    dtime = DTIME (stop, start);		\
-    fprintf (stderr, MSG, __VA_ARGS__);		\
-    gettimeofday (&start, (void *) NULL);	\
-  }
 
 # define IN_REGION(R,D) (					\
@@ -29,6 +21,5 @@
   Coords tcoords;
   
-  // struct timeval start, stop;
-  // gettimeofday (&start, (void *) NULL);
+  // INITTIME;
 
   NsecfiltOut = output[0].Nsecfilt;
Index: /branches/eam_branches/ipp-20140610/Ohana/src/dvopsps/src/insert_detections_dvopsps.c
===================================================================
--- /branches/eam_branches/ipp-20140610/Ohana/src/dvopsps/src/insert_detections_dvopsps.c	(revision 36994)
+++ /branches/eam_branches/ipp-20140610/Ohana/src/dvopsps/src/insert_detections_dvopsps.c	(revision 36995)
@@ -2,10 +2,4 @@
 # define USE_MYSQL 1
 // # define SAVE_REMOTE 1
-
-# define MARKTIME(MSG,...) {			\
-    float dtime;				\
-    gettimeofday (&stop, (void *) NULL);	\
-    dtime = DTIME (stop, start);		\
-    fprintf (stderr, MSG, __VA_ARGS__); }
 
 // we have two ways of writing to the mysql database:
@@ -245,6 +239,4 @@
   buffer.Nalloc = 0;
 
-  struct timeval start, stop;
-
   if (Ndetections == 0) return TRUE;
 
@@ -254,5 +246,5 @@
   int Ninsert = 0;
 
-  gettimeofday (&start, (void *) NULL);
+  INITTIME;
   for (i = 0; i < Ndetections; i++) {
 
Index: /branches/eam_branches/ipp-20140610/Ohana/src/dvopsps/src/insert_detections_dvopsps_catalog.c
===================================================================
--- /branches/eam_branches/ipp-20140610/Ohana/src/dvopsps/src/insert_detections_dvopsps_catalog.c	(revision 36994)
+++ /branches/eam_branches/ipp-20140610/Ohana/src/dvopsps/src/insert_detections_dvopsps_catalog.c	(revision 36995)
@@ -1,10 +1,4 @@
 # include "dvopsps.h"
 # define DEBUG 0
-
-# define MARKTIME(MSG,...) {			\
-    float dtime;				\
-    gettimeofday (&stop, (void *) NULL);	\
-    dtime = DTIME (stop, start);		\
-    fprintf (stderr, MSG, __VA_ARGS__); }
 
 int Ndetections = 0;
@@ -107,5 +101,4 @@
   off_t i, j;
   int missingID = 0;
-  struct timeval start, stop;
 
   IOBuffer buffer;
@@ -117,5 +110,5 @@
   off_t found = 0;
 
-  gettimeofday (&start, (void *) NULL);
+  INITTIME;
   insert_detections_mysql_init (&buffer);
   int Ninsert = 0;
Index: /branches/eam_branches/ipp-20140610/Ohana/src/dvopsps/src/insert_objects_dvopsps_catalog.c
===================================================================
--- /branches/eam_branches/ipp-20140610/Ohana/src/dvopsps/src/insert_objects_dvopsps_catalog.c	(revision 36994)
+++ /branches/eam_branches/ipp-20140610/Ohana/src/dvopsps/src/insert_objects_dvopsps_catalog.c	(revision 36995)
@@ -2,15 +2,8 @@
 # define DEBUG 0
 
-# define MARKTIME(MSG,...) {			\
-    float dtime;				\
-    gettimeofday (&stop, (void *) NULL);	\
-    dtime = DTIME (stop, start);		\
-    fprintf (stderr, MSG, __VA_ARGS__); }
-
 int insert_objects_dvopsps_catalog (Catalog *catalog, char *basename, MYSQL *mysql) {
 
   off_t i;
   int missingID = 0;
-  struct timeval start, stop;
 
   IOBuffer ave_buffer, sec_buffer;
@@ -31,5 +24,5 @@
   insert_objects_mysql_create_tables (cleanname, mysql);
 
-  gettimeofday (&start, (void *) NULL);
+  INITTIME;
   insert_objects_mysql_init (&ave_buffer, &sec_buffer, cleanname);
   int Ninsert = 0;
Index: /branches/eam_branches/ipp-20140610/Ohana/src/dvopsps/src/insert_skytable.c
===================================================================
--- /branches/eam_branches/ipp-20140610/Ohana/src/dvopsps/src/insert_skytable.c	(revision 36994)
+++ /branches/eam_branches/ipp-20140610/Ohana/src/dvopsps/src/insert_skytable.c	(revision 36995)
@@ -2,10 +2,4 @@
 # define DEBUG 1
 # define USE_MYSQL 1
-
-# define MARKTIME(MSG,...) {			\
-    float dtime;				\
-    gettimeofday (&stop, (void *) NULL);	\
-    dtime = DTIME (stop, start);		\
-    fprintf (stderr, MSG, __VA_ARGS__); }
 
 // determine the relevant catalogs, launch parallel clients if desired
@@ -13,5 +7,4 @@
 
   off_t i;
-  struct timeval start, stop;
   SkyTable *sky = NULL;
 
@@ -34,5 +27,6 @@
 # endif
 
-  gettimeofday (&start, (void *) NULL);
+  INITTIME;
+
   insert_skytable_mysql_init (&buffer);
   int Ninsert = 0;
Index: /branches/eam_branches/ipp-20140610/Ohana/src/photdbc/include/photdbc.h
===================================================================
--- /branches/eam_branches/ipp-20140610/Ohana/src/photdbc/include/photdbc.h	(revision 36994)
+++ /branches/eam_branches/ipp-20140610/Ohana/src/photdbc/include/photdbc.h	(revision 36995)
@@ -27,13 +27,4 @@
   double Dc;
 } SkyRegionCoords;
-
-# define MARKTIME(MSG,...) {			\
-    gettimeofday (&stopTimer, (void *) NULL);	\
-    float dtime = DTIME (stopTimer, startTimer);	\
-    fprintf (stderr, MSG, __VA_ARGS__); }
-
-# define INITTIME \
-  struct timeval startTimer, stopTimer; \
-  gettimeofday (&startTimer, (void *) NULL);
 
 int    PARALLEL;
Index: /branches/eam_branches/ipp-20140610/Ohana/src/relastro/include/relastro.h
===================================================================
--- /branches/eam_branches/ipp-20140610/Ohana/src/relastro/include/relastro.h	(revision 36994)
+++ /branches/eam_branches/ipp-20140610/Ohana/src/relastro/include/relastro.h	(revision 36995)
@@ -5,13 +5,4 @@
 # include <assert.h>
 # include <pthread.h>
-
-# define MARKTIME(MSG,...) {			\
-    gettimeofday (&stopTimer, (void *) NULL);	\
-    float dtime = DTIME (stopTimer, startTimer);	\
-    fprintf (stderr, MSG, __VA_ARGS__); }
-
-# define INITTIME \
-  struct timeval startTimer, stopTimer; \
-  gettimeofday (&startTimer, (void *) NULL);
 
 // choose off_t or int depending on full-scale relphot analysis resources
Index: /branches/eam_branches/ipp-20140610/Ohana/src/relphot/include/relphot.h
===================================================================
--- /branches/eam_branches/ipp-20140610/Ohana/src/relphot/include/relphot.h	(revision 36994)
+++ /branches/eam_branches/ipp-20140610/Ohana/src/relphot/include/relphot.h	(revision 36995)
@@ -4,13 +4,4 @@
 # include <signal.h>
 # include <pthread.h>
-
-# define MARKTIME(MSG,...) {			\
-    gettimeofday (&stopTimer, (void *) NULL);	\
-    float dtime = DTIME (stopTimer, startTimer);	\
-    fprintf (stderr, MSG, __VA_ARGS__); }
-
-# define INITTIME \
-  struct timeval startTimer, stopTimer; \
-  gettimeofday (&startTimer, (void *) NULL);
 
 /* # define GRID_V1 */
