summaryrefslogtreecommitdiff
path: root/openpicc/application/performance.h
blob: fddd9d9076a367b6b0c6224718151b8e78e6e144 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef PERFORMANCE_H_
#define PERFORMANCE_H_

extern void performance_start(void);
extern void performance_init(void);

typedef struct {
	u_int32_t high; /* 32 bit count of overruns */
	u_int32_t low;  /* 16 bit from T/C running at MCK/2 */
} perf_time_t;

extern perf_time_t performance_get(void);
extern perf_time_t performance_stop(void);

extern void performance_print(perf_time_t time);

struct performance_checkpoint {
	perf_time_t time;
	const char * description;
};

extern void performance_set_checkpoint(const char * const description);
extern void performance_stop_report(void);

#endif /*PERFORMANCE_H_*/
personal git repositories of Harald Welte. Your mileage may vary