1 #ifndef _FPS_COUNTER_H_
2 #define _FPS_COUNTER_H_
4 typedef struct fps_counter {
5 unsigned long sample_interval;
6 unsigned long sample_start_time;
7 unsigned long frame_count;
13 #endif /* __cplusplus */
15 void fps_start(fps_counter *fpsc, unsigned long time, unsigned long sample_interval);
16 int fps_frame_proc(fps_counter *fpsc, unsigned long time);
17 const char *fps_get_frame_rate_str(fps_counter *fpsc);
19 #define fps_get_frame_rate(fpsc) (fpsc)->fps
23 #endif /* __cplusplus */
25 #endif /* _FPS_COUNTER_H_ */