nngn
Loading...
Searching...
No Matches
nngn::FPS Struct Reference

#include <fps.h>

Public Types

using frame_queue = std::queue<Timing::clock::duration>
 

Public Member Functions

 FPS ()
 
 FPS (frame_queue::size_type n)
 
void init (Timing::clock::time_point t)
 
void frame (Timing::clock::time_point t)
 
void reset_min_max ()
 
std::string to_string () const
 

Public Attributes

Timing::clock::time_point last_f = {}
 
Timing::clock::time_point last_t = {}
 
Timing::clock::duration min_dt = {}
 
Timing::clock::duration max_dt = {}
 
Timing::clock::duration avg_sum = {}
 
frame_queue avg_hist
 
float avg = 0
 
size_t sec_count = 0
 
size_t sec_last = 0
 

Static Public Attributes

static constexpr frame_queue::size_type default_size = 60
 

Member Typedef Documentation

◆ frame_queue

using nngn::FPS::frame_queue = std::queue<Timing::clock::duration>

Constructor & Destructor Documentation

◆ FPS() [1/2]

nngn::FPS::FPS ( )
inline

◆ FPS() [2/2]

nngn::FPS::FPS ( frame_queue::size_type n)
explicit

Member Function Documentation

◆ frame()

void nngn::FPS::frame ( Timing::clock::time_point t)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ init()

void nngn::FPS::init ( Timing::clock::time_point t)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset_min_max()

void nngn::FPS::reset_min_max ( )
Here is the caller graph for this function:

◆ to_string()

std::string nngn::FPS::to_string ( ) const
Here is the call graph for this function:

Member Data Documentation

◆ avg

float nngn::FPS::avg = 0

◆ avg_hist

frame_queue nngn::FPS::avg_hist

◆ avg_sum

Timing::clock::duration nngn::FPS::avg_sum = {}

◆ default_size

frame_queue::size_type nngn::FPS::default_size = 60
staticconstexpr

◆ last_f

Timing::clock::time_point nngn::FPS::last_f = {}

◆ last_t

Timing::clock::time_point nngn::FPS::last_t = {}

◆ max_dt

Timing::clock::duration nngn::FPS::max_dt = {}

◆ min_dt

Timing::clock::duration nngn::FPS::min_dt = {}

◆ sec_count

size_t nngn::FPS::sec_count = 0

◆ sec_last

size_t nngn::FPS::sec_last = 0

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