47 #define __FUNC__ "Timer_dhCreate" 
   57   tmp->isRunning = 
false;
 
   58   tmp->begin_wall = 0.0;
 
   61   tmp->sc_clk_tck = CLOCKS_PER_SEC;
 
   63   tmp->sc_clk_tck = sysconf (128);
 
   66 #if defined(EUCLID_TIMING) 
   67   sprintf (msgBuf_dh, 
"using EUCLID_TIMING; _SC_CLK_TCK = %i",
 
   68        (
int) tmp->sc_clk_tck);
 
   70 #elif defined(MPI_TIMING) 
   71   SET_INFO (
"using MPI timing")
 
   73   SET_INFO (
"using JUNK timing")
 
   78 #define __FUNC__ "Timer_dhDestroy" 
   82   START_FUNC_DH FREE_DH (t);
 
   93 #define __FUNC__ "Timer_dhStart" 
   97   START_FUNC_DH t->begin_wall = times (&(t->begin_cpu));
 
  102 #define __FUNC__ "Timer_dhStop" 
  106   START_FUNC_DH t->end_wall = times (&(t->end_cpu));
 
  107   t->isRunning = 
false;
 
  111 #define __FUNC__ "Timer_dhReadWall" 
  115   START_FUNC_DH 
double retval = 0.0;
 
  116   long int sc_clk_tck = t->sc_clk_tck;
 
  118     t->end_wall = times (&(t->end_cpu));
 
  119   retval = (double) (t->end_wall - t->begin_wall) / (double) sc_clk_tck;
 
  120 END_FUNC_VAL (retval)}
 
  123 #define __FUNC__ "Timer_dhReadCPU" 
  127   START_FUNC_DH 
double retval;
 
  128   long int sc_clk_tck = t->sc_clk_tck;
 
  130     t->end_wall = times (&(t->end_cpu));
 
  131   retval = (double) (t->end_cpu.tms_utime - t->begin_cpu.tms_utime
 
  132              + t->end_cpu.tms_stime - t->begin_cpu.tms_stime
 
  133              + t->end_cpu.tms_cutime - t->begin_cpu.tms_cutime
 
  134              + t->end_cpu.tms_cstime - t->begin_cpu.tms_cstime)
 
  135     / (double) sc_clk_tck;
 
  136 END_FUNC_VAL (retval)}
 
  139 #define __FUNC__ "Timer_dhReadUsage" 
  143   START_FUNC_DH 
double cpu = Timer_dhReadCPU (t);
 
  144   double wall = Timer_dhReadWall (t);
 
  145   double retval = 100.0 * cpu / wall;
 
  146   END_FUNC_VAL (retval);
 
  154 #elif defined(MPI_TIMING) 
  157 #define __FUNC__ "Timer_dhStart" 
  161   START_FUNC_DH t->begin_wall = MPI_Wtime ();
 
  166 #define __FUNC__ "Timer_dhStop" 
  170   START_FUNC_DH t->end_wall = MPI_Wtime ();
 
  171   t->isRunning = 
false;
 
  175 #define __FUNC__ "Timer_dhReadWall" 
  179   START_FUNC_DH 
double retval;
 
  181     t->end_wall = MPI_Wtime ();
 
  182   retval = t->end_wall - t->begin_wall;
 
  183 END_FUNC_VAL (retval)}
 
  186 #define __FUNC__ "Timer_dhReadCPU" 
  190 START_FUNC_DH END_FUNC_VAL (-1.0)}
 
  193 #define __FUNC__ "Timer_dhReadUsage" 
  197   START_FUNC_DH END_FUNC_VAL (-1.0);
 
  208 #define __FUNC__ "Timer_dhStart" 
  212 START_FUNC_DH END_FUNC_DH}
 
  215 #define __FUNC__ "Timer_dhStop" 
  219 START_FUNC_DH END_FUNC_DH}
 
  222 #define __FUNC__ "Timer_dhReadWall" 
  226 START_FUNC_DH END_FUNC_VAL (-1.0)}
 
  229 #define __FUNC__ "Timer_dhReadCPU" 
  233 START_FUNC_DH END_FUNC_VAL (-1.0)}
 
  236 #define __FUNC__ "Timer_dhReadUsage" 
  240   START_FUNC_DH END_FUNC_VAL (-1.0);