Carp/core/carp_bench.h
Chris Hall e1e80e2b81 Adding time.h header to carp_bench.h to resolve bug #208
Under POSIX clock_gettime and timespec are defined in time.h
I don't think we need sys/time.h
2018-04-02 10:27:36 +10:00

8 lines
167 B
C

#include <time.h>
double get_MINUS_time_MINUS_elapsed() {
struct timespec tv;
clock_gettime(CLOCK_REALTIME, &tv);
return 1000000000 * tv.tv_sec + tv.tv_nsec;
}