debug_timer.h (557B)
1 #ifndef DEBUG_TIMER_H_ 2 #define DEBUG_TIMER_H_ 3 4 #include <time.h> 5 6 typedef struct debug_timer_t { 7 unsigned int count; 8 long total; 9 struct timespec snap_start; 10 struct timespec snap_end; 11 struct timespec snap_tmp; 12 int running; 13 int paused; 14 } debug_timer_t; 15 16 #ifdef __cplusplus 17 extern "C" { 18 #endif 19 void debugTimerReset(debug_timer_t *time); 20 void debugTimerStart(debug_timer_t *time); 21 void debugTimerStop(debug_timer_t *time); 22 long debugTimerPause(debug_timer_t *time); 23 float debugTimerGetAverage(debug_timer_t *time); 24 25 #ifdef __cplusplus 26 } 27 #endif 28 29 #endif