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

#include <timing.h>

Public Types

using clock = std::chrono::steady_clock
 
using time_point = clock::time_point
 
using duration = clock::duration
 

Public Member Functions

duration::rep now_ns (void) const
 
duration::rep now_us (void) const
 
duration::rep now_ms (void) const
 
duration::rep now_s (void) const
 
float fnow_ns (void) const
 
float fnow_us (void) const
 
float fnow_ms (void) const
 
float fnow_s (void) const
 
duration::rep dt_ns (void) const
 
duration::rep dt_us (void) const
 
duration::rep dt_ms (void) const
 
duration::rep dt_s (void) const
 
float fdt_ns (void) const
 
float fdt_us (void) const
 
float fdt_ms (void) const
 
float fdt_s (void) const
 
void update (void)
 

Static Public Member Functions

template<typename F >
static duration time (F &&f)
 

Public Attributes

time_point now = clock::now()
 
u64 frame = 0
 
duration dt = duration(0)
 
float scale = 1.0f
 

Member Typedef Documentation

◆ clock

using nngn::Timing::clock = std::chrono::steady_clock

◆ duration

using nngn::Timing::duration = clock::duration

◆ time_point

using nngn::Timing::time_point = clock::time_point

Member Function Documentation

◆ dt_ms()

rep nngn::Timing::dt_ms ( void ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dt_ns()

rep nngn::Timing::dt_ns ( void ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dt_s()

rep nngn::Timing::dt_s ( void ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dt_us()

rep nngn::Timing::dt_us ( void ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fdt_ms()

float nngn::Timing::fdt_ms ( void ) const
Here is the call graph for this function:

◆ fdt_ns()

float nngn::Timing::fdt_ns ( void ) const
Here is the call graph for this function:

◆ fdt_s()

float nngn::Timing::fdt_s ( void ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fdt_us()

float nngn::Timing::fdt_us ( void ) const
Here is the call graph for this function:

◆ fnow_ms()

float nngn::Timing::fnow_ms ( void ) const
Here is the call graph for this function:

◆ fnow_ns()

float nngn::Timing::fnow_ns ( void ) const
Here is the call graph for this function:

◆ fnow_s()

float nngn::Timing::fnow_s ( void ) const
Here is the call graph for this function:

◆ fnow_us()

float nngn::Timing::fnow_us ( void ) const
Here is the call graph for this function:

◆ now_ms()

rep nngn::Timing::now_ms ( void ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ now_ns()

rep nngn::Timing::now_ns ( void ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ now_s()

rep nngn::Timing::now_s ( void ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ now_us()

rep nngn::Timing::now_us ( void ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ time()

template<typename F >
Timing::duration nngn::Timing::time ( F && f)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update()

void nngn::Timing::update ( void )

Member Data Documentation

◆ dt

duration nngn::Timing::dt = duration(0)

◆ frame

u64 nngn::Timing::frame = 0

◆ now

time_point nngn::Timing::now = clock::now()

◆ scale

float nngn::Timing::scale = 1.0f

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