ref: bbdcad5c85ca1a0daa21bf1f8f70ea9394cb7a02
dir: /b.h/
typedef struct B B; typedef struct Cns Cns; struct Cns { uvlong c; uvlong ns; }; #pragma varargck type "σ" B* #pragma varargck type "τ" Cns struct B { uvlong n; uvlong tin; uvlong tout; uvlong step; uvlong t0; Cns tot, avg, med, min, max; Cns p[100]; uvlong *c; int nc, ic; char *name; }; /* private */ void benchstep(B *b); extern void (*tstart)(uvlong *c); extern void (*tend)(uvlong *c); /* public */ void benchinit(B *b, char *name); void benchprint(B *b, int nb, int fd); #define benchin(b) do{ tstart(&(b)->tin); }while(0) #define benchout(b) do{ tend(&(b)->tout); benchstep(b); }while(0)