Trim the API a bit.
Also, just always use gettimeofday(), which is portable. Hopefully the
system clock doesn't change while a benchmark is running.
Signed-off-by: Ran Benita <ran234@gmail.com>
Otherwise it can segfault e.g. running ./compose inside the bench
directory.
Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
Signed-off-by: Ran Benita <ran234@gmail.com>
- Add the new files bench.c and bench.h to implement a timer module.
- Implement the module with clock_gettime(), mach_absolute_time(), or
gettimeofday(), depending on a given platform.
- Replace the time measurement code of the benchmark programs with the
functions of the module.