43 gettimeofday(&tmptv, NULL);
44 return (
timer_uint)tmptv.tv_sec * 1000000U + tmptv.tv_usec;
61 LARGE_INTEGER start_time;
62 QueryPerformanceCounter(&start_time);
71 QueryPerformanceFrequency(&perf);
72 timer_perf_freq = perf.QuadPart;
74 return (
timer_new() - start) * 1000000U / timer_perf_freq;
88 #if defined(__x86_64__) || defined(__i386__)
92 #include <x86intrin.h>
#define unlikely(exp)
Optimize the branch as likely not taken.
Definition: core.h:51
static timer_uint timer_hr_value(timer_uint start)
Compute a time interval measure using a previous timer_uint value.
Definition: timer.h:114
uint_fast64_t timer_uint
Definition: timer.h:19
static timer_uint timer_hr_new(void)
Start a high resolution, CPU dependent time interval measure.
Definition: timer.h:102
static timer_uint timer_value(timer_uint start)
Compute a time interval measure using a previous timer_uint value.
static timer_uint timer_new(void)
Get a new starting point for an time interval measure.