18 LastFpsCalcutionTime = OldTime = StartTime = high_resolution_clock::now();
23 time_point current_time = high_resolution_clock::now();
24 Time = duration<float>(current_time - StartTime).count();
26 LastFpsCalcutionFramesCount++;
27 float fps_calculation_delta_time = duration<float>(current_time - LastFpsCalcutionTime).count();
28 if (fps_calculation_delta_time >= UpdateDelay)
30 Fps = LastFpsCalcutionFramesCount / fps_calculation_delta_time;
31 LastFpsCalcutionTime = high_resolution_clock::now();
32 LastFpsCalcutionFramesCount = 0;
35 DeltaTime = duration<float>(current_time - OldTime).count();
36 OldTime = current_time;
static const float UpdateDelay
std::shared_ptr< T > shared
Sculpto library prehompiled header. Defines common definitions, includes commonly used modules.
Timer, calculating interframe deltatime and fps class implementation module.