1 /*
2                     SAR Frames Per Second Tallying
3  */
4 
5 #ifndef SARFPS_H
6 #define SARFPS_H
7 
8 #include <sys/stat.h>
9 
10 /*
11  *	Frame counter structure for the sar_fps_struct:
12  */
13 typedef struct {
14 
15 	/* Number of frames drawn. */
16 	unsigned int	selection,		/* Selection buffer. */
17 			frame,			/* Frame buffer. */
18 			total;
19 
20 } sar_fps_frames_struct;
21 
22 /*
23  *	Frames per second tallying structure:
24  */
25 typedef struct {
26 
27 	void *core_ptr;		/* Pointer back to core. */
28 	void *gw_ptr;		/* Pointer back to graphics wrapper structure
29 				 * so we know which window we're taking
30 				 * fps stats for.
31 				 */
32 
33 	/* Frames results from last tally. */
34 	sar_fps_frames_struct ft;
35 
36 	/* Frames currently being counted. */
37 	sar_fps_frames_struct fc;
38 
39 	time_t last_frames_reset;	/* Last time frames reset to 0 in
40 					 * milliseconds.
41 					 */
42 	time_t next_tally;		/* Always last_frames_reset + 1000
43 					 * milliseconds.
44 					 */
45 
46 } sar_fps_struct;
47 
48 #endif	/* SARFPS_H */
49