I am trying to compare the computation time
for performance comparison using different C libraries with gettimeofday()
by including time.h
and sys/time.h
header files.
I used gettimeofday()
at the start and end of my computation and took the difference. But each time I execute my C code, I get fluctuating time as answer. For example
0.007 sec,
0.004 sec,
0.009 sec etc.
Is there a way I could take the average of 50 such results other than manually make 50 such executions and taking the average of all results.