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

#include <fps.h>

Public Types

using frame_queue = std::queue< Timing::clock::duration >
 
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
 
 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 [1/2]

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

◆ frame_queue [2/2]

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

Constructor & Destructor Documentation

◆ FPS() [1/4]

nngn::FPS::FPS ( )
inline

◆ FPS() [2/4]

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

◆ FPS() [3/4]

nngn::FPS::FPS ( )
inline

◆ FPS() [4/4]

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

Member Function Documentation

◆ frame() [1/2]

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:

◆ frame() [2/2]

void nngn::FPS::frame ( Timing::clock::time_point  t)

◆ init() [1/2]

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:

◆ init() [2/2]

void nngn::FPS::init ( Timing::clock::time_point  t)

◆ reset_min_max() [1/2]

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

◆ reset_min_max() [2/2]

void nngn::FPS::reset_min_max ( )

◆ to_string() [1/2]

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

◆ to_string() [2/2]

std::string nngn::FPS::to_string ( ) const

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

static constexpr 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: