benchs.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef _BENCHS_H
00029 #define _BENCHS_H
00030
00067
00068 #include <sys/param.h>
00069 #include <sys/ports.h>
00070
00075 struct bench
00076 {
00078 unsigned short b_start;
00079
00081 unsigned short b_stop;
00082
00085 unsigned short b_correction;
00086
00088 unsigned short b_delta;
00089 };
00090 typedef struct bench bench_t;
00091
00103 extern void
00104 bench_init (bench_t *b);
00105
00114 extern void bench_start (bench_t *b);
00115
00116 extern __inline__ void
00117 bench_start (bench_t *b)
00118 {
00119 b->b_start = get_timer_counter ();
00120 }
00121
00130 extern void bench_stop (bench_t *b);
00131
00132 extern __inline__ void
00133 bench_stop (bench_t *b)
00134 {
00135 b->b_stop = get_timer_counter ();
00136 }
00137
00147 extern void
00148 bench_report (bench_t *b, const char *msg, ...);
00149
00150
00159 extern void
00160 bench_empty (bench_t *b);
00161
00164 #endif
|