summaryrefslogtreecommitdiff
path: root/openpicc/application/performance.h
diff options
context:
space:
mode:
Diffstat (limited to 'openpicc/application/performance.h')
-rw-r--r--openpicc/application/performance.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/openpicc/application/performance.h b/openpicc/application/performance.h
new file mode 100644
index 0000000..fddd9d9
--- /dev/null
+++ b/openpicc/application/performance.h
@@ -0,0 +1,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