Go to the documentation of this file.
26 #ifndef AVUTIL_TIMER_H
27 #define AVUTIL_TIMER_H
47 #if !defined(AV_READ_TIME) && HAVE_GETHRTIME
48 # define AV_READ_TIME gethrtime
54 uint64_t tstart = AV_READ_TIME(); \
56 #define STOP_TIMER(id) \
57 tend = AV_READ_TIME(); \
59 static uint64_t tsum = 0; \
60 static int tcount = 0; \
61 static int tskip_count = 0; \
63 tend - tstart < 8 * tsum / tcount || \
64 tend - tstart < 2000) { \
65 tsum+= tend - tstart; \
69 if (((tcount + tskip_count) & (tcount + tskip_count - 1)) == 0) { \
70 av_log(NULL, AV_LOG_ERROR, \
71 "%"PRIu64" decicycles in %s, %d runs, %d skips\n", \
72 tsum * 10 / tcount, id, tcount, tskip_count); \
77 #define STOP_TIMER(id) { }