Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
FpS Class Reference

Class to measure frames per second. More...

#include <util.h>

Public Member Functions

 FpS ()
 Constructor. Get the first measurement. More...
 
void measure ()
 Actualize the frame rate. More...
 
void print ()
 Print the frame rate. More...
 
bool isNew ()
 The frame rate has been updated. More...
 

Public Attributes

float fps
 Current frame rate. More...
 

Private Member Functions

int64_t timespecDiff (struct timespec *timeA_p, struct timespec *timeB_p)
 

Private Attributes

int fps_counter
 
struct timespec fps_time_start fps_time_end
 

Detailed Description

Class to measure frames per second.

Definition at line 182 of file util.h.

Constructor & Destructor Documentation

FpS::FpS ( )

Constructor. Get the first measurement.

Member Function Documentation

bool FpS::isNew ( )

The frame rate has been updated.

void FpS::measure ( )

Actualize the frame rate.

void FpS::print ( )

Print the frame rate.

Member Data Documentation

float FpS::fps

Current frame rate.

Definition at line 200 of file util.h.


The documentation for this class was generated from the following file: