In the bmark program, the execution time is calculated as follow:
For example, for EC point multiplication:
#define MIN_TIME 10.0
#define MIN_ITERS 20
} while (elapsed<MIN_TIME || iterations<MIN_ITERS);
printf("ER - %8d iterations",iterations);
printf(" %8.2lf ms per iteration\n",elapsed);
The code is trying to execute
ecurv_mult() enough times to make up for the lack of precision in the time measurement. So the loop makes sure it gets executed at least 20 times and for at least 10 seconds.
Since some machines might be so fast that executing 20 times is not enough time to get the accurate precision, on those we make sure to do it for at least 10 seconds regardless of how fast we did those 20 times.
If we do it only once, our performance measurement is not going to be very accurate due to the resolution of the clock being too high (e.g. the clock gives us 1ms while the benchmark runs in 500us).