doc: Add serial to list of ci file reserved words
[charm.git] / src / ck-ldb / tm_timings.c
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(){
7   clock_num++;
8
9   if(clock_num>MAX_CLOCK-1)
10     return;
11
12   
13
14   CLOCK(time_tab[clock_num]);
15 }
16
17 double time_diff(){
18   CLOCK_T t2,t1;
19   
20
21   if(clock_num>MAX_CLOCK-1){
22     clock_num--;
23     return -1.0;
24   }
25
26   CLOCK(t2);
27   t1=time_tab[clock_num--];
28
29
30   return CLOCK_DIFF(t2,t1);
31 }