aboutsummaryrefslogtreecommitdiff
path: root/malloclab-handout/ftimer.h
blob: 3400603d96b12348e5acc6021b83824589eed846 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14

/* 
 * Function timers 
 */
typedef void (*ftimer_test_funct)(void *); 

/* Estimate the running time of f(argp) using the Unix interval timer.
   Return the average of n runs */
double ftimer_itimer(ftimer_test_funct f, void *argp, int n);


/* Estimate the running time of f(argp) using gettimeofday 
   Return the average of n runs */
double ftimer_gettod(ftimer_test_funct f, void *argp, int n);