Brenta Engine 1.2
Loading...
Searching...
No Matches
brenta::time Class Reference

Time subsystem. More...

#include <time.hpp>

Static Public Member Functions

static float get_current_time ()
 Get the current time.
 
static float get_delta_time ()
 Get the time since the last frame.
 
static float get_fps ()
 Get the frames per second.
 
static void update (float new_time)
 Update the time.
 

Detailed Description

Time subsystem.

This subsystem is used to manage the time of the engine. It is used to get the current time, the time since the last frame and the frames per second of the program.

Definition at line 18 of file time.hpp.

Member Function Documentation

◆ get_current_time()

float time::get_current_time ( )
static

Get the current time.

This function returns the current time in seconds since the start of the program.

Returns
The current time in seconds

Definition at line 15 of file time.cpp.

◆ get_delta_time()

float time::get_delta_time ( )
static

Get the time since the last frame.

This function returns the time since the last update in seconds.

Returns
The time since the last frame in seconds

Definition at line 20 of file time.cpp.

◆ get_fps()

float time::get_fps ( )
static

Get the frames per second.

This function returns the frames per second of the program.

Returns
The frames per second

Definition at line 25 of file time.cpp.

◆ update()

void time::update ( float new_time)
static

Update the time.

This function updates the time of the program. It's intended use is to be called at each tick of the game loop.

Parameters
newTimeThe new time of the program

Definition at line 30 of file time.cpp.


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