R-Type
DeltaTime.hpp
Go to the documentation of this file.
1 /*
2 ** EPITECH PROJECT, 2023
3 ** R-Type
4 ** File description:
5 ** DeltaTime
6 */
7 
8 #ifndef DELTATIME_HPP_
9 #define DELTATIME_HPP_
10 #include <chrono>
11 
12 namespace GameEngine
13 {
15  class DeltaTime
16  {
17  public:
18  DeltaTime();
19  ~DeltaTime() = default;
20 
22  void update();
25  const float &getDeltaTime() const;
26 
27  private:
28  std::chrono::steady_clock::time_point _lastTime;
29  float _deltaTime;
30  };
31 } // namespace GameEngine
32 
33 #endif /* !DELTATIME_HPP_ */
DeltaTime class which handles the delta time.
Definition: DeltaTime.hpp:16
void update()
Updates the delta time.
Definition: DeltaTime.cpp:16
DeltaTime()
Definition: DeltaTime.cpp:10
const float & getDeltaTime() const
Getter for the delta time.
Definition: DeltaTime.cpp:25
Definition: AssetManager.hpp:15