nngn
anonymous_namespace{terminal.cpp}::FrameLimiter Class Reference

Simulates a v-sync pause using sleep. More...

Public Member Functions

int interval () const
 
void set_interval (int i)
 
void limit ()
 sleeps for as long as necessary to maintain a constant frame rate. More...
 

Private Attributes

int m_interval = 1
 
nngn::Timing::time_point last = {}
 

Detailed Description

Simulates a v-sync pause using sleep.

Member Function Documentation

◆ interval()

int anonymous_namespace{terminal.cpp}::FrameLimiter::interval ( ) const
inline
Here is the caller graph for this function:

◆ limit()

void anonymous_namespace{terminal.cpp}::FrameLimiter::limit ( )

sleeps for as long as necessary to maintain a constant frame rate.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_interval()

void anonymous_namespace{terminal.cpp}::FrameLimiter::set_interval ( int  i)
inline
Here is the caller graph for this function:

Member Data Documentation

◆ last

nngn::Timing::time_point anonymous_namespace{terminal.cpp}::FrameLimiter::last = {}
private

◆ m_interval

int anonymous_namespace{terminal.cpp}::FrameLimiter::m_interval = 1
private

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