Trace Engine
A Raycaster Engine in C
Loading...
Searching...
No Matches
delta_time.h File Reference

Go to the source code of this file.

Data Structures

struct  delta_time_counter_t
 

Functions

void init_delta_time_counter (void)
 
void update_delta_time_counter (void)
 
float get_delta_time (void)
 

Function Documentation

◆ get_delta_time()

float get_delta_time ( void  )

Returns the difference between the actual frame and the last one

◆ init_delta_time_counter()

void init_delta_time_counter ( void  )

Initialize everything to track delta_time

◆ update_delta_time_counter()

void update_delta_time_counter ( void  )

Update the current delta_time

Note
This NEEDS to be called every frame, in the main loop