Mercurial > hg > Members > kono > tree_dandy2
diff profile.h @ 0:01387a2e419e
initial version
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 07 Dec 2010 15:39:45 +0900 |
parents | |
children | 972a7f233b23 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/profile.h Tue Dec 07 15:39:45 2010 +0900 @@ -0,0 +1,20 @@ +typedef struct { + unsigned int sec; + unsigned int usec; +} mysec; + +typedef struct time_profile { + mysec begin, end; + unsigned int average; + unsigned int peak; +} *Timeprof; + +extern Timeprof timeprof_new(); +// extern unsigned long timeprof_get(Timeprof t); +extern void timeprof_sprint(char *s, char *profname, Timeprof t); + +// #define timeprof_begin(t) timeprof_set_point(&((t)->begin)) +// #define timeprof_end(t) timeprof_set_point(&((t)->end)) + +extern void timeprof_begin(Timeprof t); +extern int timeprof_end(Timeprof t);