14 std::chrono::time_point<std::chrono::high_resolution_clock>
_lastTime = std::chrono::high_resolution_clock::now();
24 auto now = std::chrono::high_resolution_clock::now();
25 time._elapsedTime = std::chrono::duration<float>(now - time.
_lastTime).count();
The core is the place where all the data of the engine is stored. It contains the registry (entities)...
Definition Core.hpp:33
TResource & GetResource()
Get a reference of a resource.
Definition Core.inl:14
Resource that stores the elapsed time since the last frame.
Definition Time.hpp:9
static void Update(Core &core)
Update the _elapsedTime since the last frame. It should be called at the beginning of each frame to u...
Definition Time.hpp:21
float _elapsedTime
Elapsed time since the last frame in seconds.
Definition Time.hpp:11
std::chrono::time_point< std::chrono::high_resolution_clock > _lastTime
The time point of the last frame. It is used to calculate the elapsed time since the last frame.
Definition Time.hpp:14