root/ompi/mca/topo/treematch/treematch/tm_timings.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. get_time
  2. time_diff

   1 #include "tm_timings.h"
   2 
   3 static CLOCK_T time_tab[MAX_CLOCK];
   4 static int clock_num = -1;
   5 
   6 void get_time(void)
   7 {
   8   clock_num++;
   9 
  10   if(clock_num>MAX_CLOCK-1)
  11     return;
  12 
  13   CLOCK(time_tab[clock_num]);
  14 }
  15 
  16 double time_diff(void)
  17 {
  18   CLOCK_T t2,t1;
  19 
  20   if(clock_num>MAX_CLOCK-1){
  21     clock_num--;
  22     return -1.0;
  23   }
  24 
  25   if(clock_num < 0){
  26     return -2.0;
  27   }
  28 
  29   CLOCK(t2);
  30   t1=time_tab[clock_num--];
  31 
  32   return CLOCK_DIFF(t2,t1);
  33 }

/* [<][>][^][v][top][bottom][index][help] */