Cub3D
 
Loading...
Searching...
No Matches
ft_time.c File Reference
#include "cub3d.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <sys/time.h>
Include dependency graph for ft_time.c:

Functions

uint64_t get_time_ms (void)
 Get time in milliseconds.
 
uint64_t timeval_to_us (const struct timeval *tv)
 Convert a timeval in microseconds.
 
void print_fps (uint16_t fps, double delta)
 
uint16_t count_fps (bool print)
 Count the FPS and print it to the console. It will print the FPS every second if DEBUG_PRINT_FPS is set to 1.
 

Function Documentation

◆ print_fps()

void print_fps ( uint16_t fps,
double delta )