/* * timer.h: header for timer.c * * Madhu Nayakkankuppam, first written: 1/15/1998 * * last modified: 9/24/2002 * */ #ifndef _TIMER_H_ #define _TIMER_H_ #ifndef _SYS_TIMES_H #include #endif #ifndef _SYS_TYPES_H_ #include #endif #ifndef _LIBC_LIMITS_H_ #include #endif #ifndef _TIME_H_ #include #endif #define CLK_TCK 100 /* defined in bits/time.h; clock resolution is * 1/100th of a second. */ typedef struct tms tms_t; typedef struct TIMER { clock_t info; clock_t utime; /* starting user time */ clock_t stime; /* starting system time */ clock_t ut; /* user time at start or previous reset */ clock_t st; /* system time at start or previous reset */ struct tms *timing; } TIMER; /*----------------------------------------------------------------------*/ TIMER *new_timer(void); void kill_timer(TIMER *t); void reset_timer(TIMER *t); void update_timer(TIMER *t); double usertime(TIMER *t); double systemtime(TIMER *t); #endif /* __TIMER_H__ */