malloclab/ftimer.h
CS3214 Class Account fab3f24f1c Last set of updates for Spring 2016
- added vary_size -s option
- switch to clock_gettime() based accounting
- tuned AVG_LIBC_THRUPUT
- introduced THREAD_SAFE flag to separate mt results
2016-04-10 00:14:52 -04:00

18 lines
558 B
C

/*
* 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);
/* Estimate the running time of f(argp) using clock_gettime
Return the average of n runs */
double ftimer_clock(ftimer_test_funct f, void *argp, int n);