Hello,
First of all I would like to thank you for sharing single header benchmark library for C, unfortunately there is very little or no benchmark tools like that. I do have one problem though. On Windows with GCC the measurements are incorrect, yet while using Linux and GNU compiler everything works like a charm.
Here is the sample output, please notice incorrect mean and confidence interval

I was able to fix it adding the correct define if defined(__linux__) || defined(__GNUC__) this would ensure that time.h is included as well as UBENCH_USE_CLOCKGETTIME gets defined to use clock_gettime.

And the output looks more or less correct except it breaks DO_NOTHING call

If you would like to reproduce the issue let me know, I may attach a sample repo. The only requirement would be to have mingw installed on Windows machine and CMake 3.0+
Thanks!
Hello,
First of all I would like to thank you for sharing single header benchmark library for C, unfortunately there is very little or no benchmark tools like that. I do have one problem though. On Windows with GCC the measurements are incorrect, yet while using Linux and GNU compiler everything works like a charm.
Here is the sample output, please notice incorrect mean and confidence interval
I was able to fix it adding the correct define
if defined(__linux__) || defined(__GNUC__)this would ensure that time.h is included as well as UBENCH_USE_CLOCKGETTIME gets defined to useclock_gettime.And the output looks more or less correct except it breaks DO_NOTHING call

If you would like to reproduce the issue let me know, I may attach a sample repo. The only requirement would be to have mingw installed on Windows machine and CMake 3.0+
Thanks!