view profile.h @ 35:3b92a4b17049 default tip

fix for macosx Yosemite
author Nozomi
date Thu, 19 May 2016 18:18:34 +0900
parents 972a7f233b23
children
line wrap: on
line source

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, const 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);