diff options
Diffstat (limited to 'src/benchmark.h')
-rw-r--r-- | src/benchmark.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/benchmark.h b/src/benchmark.h new file mode 100644 index 0000000000..0627e01b7b --- /dev/null +++ b/src/benchmark.h @@ -0,0 +1,22 @@ +#include <sys/time.h> +#include <time.h> +#include <signal.h> +#include "timespec.h" /* gnulib gettime */ + +typedef void (*sighandler_t)(int); + +struct benchmark_st +{ + struct timespec start; + unsigned long size; + sighandler_t old_handler; +#if defined(_WIN32) + W32_ALARM_VARIABLES; +#endif +}; + +extern int benchmark_must_finish; + +void start_benchmark(struct benchmark_st * st); +double stop_benchmark(struct benchmark_st * st); + |