Kohi Game Engine
metrics.h File Reference
#include "defines.h"

Go to the source code of this file.

Functions

KAPI void metrics_initialize (void)
 Initializes the metrics system. More...
 
KAPI void metrics_update (f64 frame_elapsed_time)
 Updates metrics; should be called once per frame. More...
 
KAPI f64 metrics_fps (void)
 Returns the running average frames per second (fps). More...
 
KAPI f64 metrics_frame_time (void)
 Returns the running average frametime in milliseconds. More...
 
KAPI void metrics_frame (f64 *out_fps, f64 *out_frame_ms)
 Gets both the running average frames per second (fps) and frametime in milliseconds. More...
 

Function Documentation

◆ metrics_fps()

KAPI f64 metrics_fps ( void  )

Returns the running average frames per second (fps).

◆ metrics_frame()

KAPI void metrics_frame ( f64 out_fps,
f64 out_frame_ms 
)

Gets both the running average frames per second (fps) and frametime in milliseconds.

Parameters
out_fpsA pointer to hold the running average frames per second (fps).
out_frame_msA pointer to hold the running average frametime in milliseconds.

◆ metrics_frame_time()

KAPI f64 metrics_frame_time ( void  )

Returns the running average frametime in milliseconds.

◆ metrics_initialize()

KAPI void metrics_initialize ( void  )

Initializes the metrics system.

◆ metrics_update()

KAPI void metrics_update ( f64  frame_elapsed_time)

Updates metrics; should be called once per frame.

Parameters
frame_elapsed_timeThe amount of time elapsed on the previous frame.