jubilant-funicular
Public Member Functions | Private Attributes | List of all members
nta::FPSLimiter Class Reference

used to cap the fps of the program at a specific value More...

#include <FPSLimiter.h>

Inheritance diagram for nta::FPSLimiter:
Inheritance graph
[legend]
Collaboration diagram for nta::FPSLimiter:
Collaboration graph
[legend]

Public Member Functions

 FPSLimiter (float max=60)
 constructor and destructor
 
void setMaxFPS (float maxFPS)
 sets maximum allowed fps
 
float getFPS () const
 gets most recently calculated fps
 
long double end ()
 ends fps calculations, delaying if necessary to cap fps
 
- Public Member Functions inherited from nta::Timer
 Timer ()
 constructor and destructor
 
virtual void begin ()
 begins timer
 
virtual long double end () const
 return time since beginning of timer in nanoseconds
 

Private Attributes

float m_fps
 most recently calculated fps
 
float m_maxFPS
 maximum allowed fps
 

Additional Inherited Members

- Protected Attributes inherited from nta::Timer
std::chrono::time_point< std::chrono::high_resolution_clock, std::chrono::nanoseconds > m_startPoint
 

Detailed Description

used to cap the fps of the program at a specific value

Definition at line 8 of file FPSLimiter.h.


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