7 #ifndef SECP256K1_BENCH_H 8 #define SECP256K1_BENCH_H 14 static double gettimedouble(
void) {
16 gettimeofday(&tv, NULL);
17 return tv.tv_usec * 0.000001 + tv.tv_sec;
26 while (y > 0 && y < 100.0) {
35 double min = HUGE_VAL;
38 for (i = 0; i <
count; i++) {
43 begin = gettimedouble();
45 total = gettimedouble() - begin;
46 if (teardown != NULL) {
void run_benchmark(char *name, void(*benchmark)(void *), void(*setup)(void *), void(*teardown)(void *), void *data, int count, int iter)
void print_number(double x)