Trace Engine
A Raycaster Engine in C
Loading...
Searching...
No Matches
delta_time.c File Reference
#include "delta_time.h"
#include "log.h"
#include "trc_timer.h"

Functions

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

Variables

delta_time_counter_t delta_t_ctr = {0}
 

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

Variable Documentation

◆ delta_t_ctr

delta_time_counter_t delta_t_ctr = {0}