Brenta Engine
1.2
Loading...
Searching...
No Matches
time.cpp
1
// SPDX-License-Identifier: MIT
2
// Author: Giovanni Santini
3
// Mail: giovanni.santini@proton.me
4
// Github: @San7o
5
6
#include <brenta/time.hpp>
7
8
using namespace
brenta;
9
10
float
Time::get_fps()
11
{
12
return
1.0f / this->delta;
13
}
14
15
void
Time::update(
float
new_time)
16
{
17
this->elapsed = new_time;
18
this->delta = this->elapsed - this->last_frame;
19
this->last_frame = this->elapsed;
20
}
src
time.cpp
Generated by
1.9.8