Brenta Engine 1.2
Loading...
Searching...
No Matches
time.hpp
1// SPDX-License-Identifier: MIT
2// Author: Giovanni Santini
3// Mail: giovanni.santini@proton.me
4// Github: @San7o
5
6#pragma once
7
8namespace brenta
9{
10
18class time
19{
20public:
21 time() = delete;
22
31 static float get_current_time();
39 static float get_delta_time();
47 static float get_fps();
56 static void update(float new_time);
57
58private:
59 static float current_time;
60 static float delta_time;
61 static float last_frame;
62};
63
64} // namespace brenta
Time subsystem.
Definition time.hpp:19
static float get_current_time()
Get the current time.
Definition time.cpp:15
static void update(float new_time)
Update the time.
Definition time.cpp:30
static float get_delta_time()
Get the time since the last frame.
Definition time.cpp:20
static float get_fps()
Get the frames per second.
Definition time.cpp:25