Skip to content

LoopStatus

Gabriel Galli edited this page Feb 26, 2019 · 3 revisions

lasso::LoopStatus holds the state of the game loop that lasso::MainLoop runs. It has the following public member variables:

  • int fps, which holds the FPS count smoothed by MainLoop::fps_smoothing;
  • duration time_frame, which is how long the last frame took to run (time_curr - time_prev) and is used to advance time_simulation_available;
  • duration time_total_elapsed, which accumulates the total elapsed time since the loop started;
  • duration time_total_simulated, which accumulates in MainLoop::delta steps the time spent simulating since the loop started (that is, not the real time);
  • duration time_simulation_available, which holds the time that has accumulated and is still available to simulate since the last simulation (the lag from Game Programming Patterns);
  • clock::time_point time_curr, the point in time that the current frame started;
  • clock::time_point time_prev, the point in time that the previous frame started.
Clone this wiki locally