Go to the documentation of this file.
26#include <core/config.h>
40#if defined(H2CORE_HAVE_DEBUG) and defined(HAVE_RTCLOCK)
43 #define RTCLOCK_SETUP struct timespec __t0,__t1;
44 #define RTCLOCK_START clock_gettime(CLOCK_MONOTONIC, &__t0);
45 #define RTCLOCK_STOP clock_gettime(CLOCK_MONOTONIC, &__t1);
46 #define RTCLOCK_NS (((__t1.tv_sec * 1000000000) + __t1.tv_nsec) - ((__t0.tv_sec * 1000000000) + __t0.tv_nsec))
47 #define RTCLOCK_US (((__t1.tv_sec * 1000000000) + __t1.tv_nsec) - ((__t0.tv_sec * 1000000000) + __t0.tv_nsec))/1000
48 #define RTCLOCK_MS (((__t1.tv_sec * 1000000000) + __t1.tv_nsec) - ((__t0.tv_sec * 1000000000) + __t0.tv_nsec))/1000000